ΣSigmaStudio Ask AI Русский Log in

how to limit upper value of index up/dw counter

SigmaDSP & SigmaStudio charlie.paterlini@gmail.com Mar 16, 2018 00:00 6 replies Original on forum ↗
Subscribe
charlie.paterlini@gmail.com Question
Mar 16, 2018 00:00

I've found no way to limit the up/dw index upper value. The LUT that follows will limit but the counter continue to go up. If you turn the encoder clockwise, over the accepted value, you need to turn back much more steps than required. There's some way to stop, say to 25 the count?

Thanks in advance,

Charlie.

DaveThib Reply
Mar 16, 2018 00:00

Hello Charlie,

I would love to help you. Can you let us know what processor you are using? Show us what cells you are using? The best would be to upload your program.

Thanks,

Dave T

charlie.paterlini@gmail.com Reply
Mar 17, 2018 00:00

Hi, sorrry to have forgotten the whole data...

DSP adau1701

sigmastudio 3.16

charlie.paterlini@gmail.com Reply
Mar 17, 2018 00:00

Hi, sorry to have forgotten the whole data...

DSP adau1701

sigmastudio 3.16

DaveThib Reply
Mar 20, 2018 00:00

Hello Charlie,

Sorry this took so long.

You can use the up/down counter that has a lookup table. This cell will not go beyond the number of elements in the table. The only little detail is that it is a little difficult to input a number that is an unsigned integer that is required for some control inputs. This project shows you how to do that and you can export the table.

This project is attached.

fea3bb2e4d6ace332d1fddb82e8a51c8.jpg
fea3bb2e4d6ace332d1fddb82e8a51c8.jpg
fea3bb2e4d6ace332d1fddb82e8a51c8.jpg-620x213.jpg
fea3bb2e4d6ace332d1fddb82e8a51c8.jpg-620x213.jpg
charlie.paterlini@gmail.com Reply
Mar 28, 2018 00:00

Hi Dave, I've well understood the conversion issue. Could you please convert for me a simple table (attached) having index 2^23 ? Or better link me to some app that makes the task?

Thanks in advance.

Hoping some day to help you...

Charlie.

DaveThib Reply
Mar 28, 2018 00:00

Hello Charlie,

I have this Excel spread sheet set up and it is really easy to do with the windows scientific calculator.

Type in the index number, then hit divide then type in a 2 and hit the x^y key and type in 23 then the equal key. Then you can hit CTRL-C and copy the result and paste it into the table.

If you have a lot then using the spreadsheet and copying it to a txt file and importing it into the table is a quick way to do it.