[sdiy] dave smith *instruments*
David Brown
davebr at earthlink.net
Mon Feb 1 23:41:54 CET 2010
I actually do just the opposite for my LCD displays. I build a ram
buffer for the contents and put whatever data however fast into the
memory. On a timer interrupt I update the LCD. I don't remember the
rate but it is fairly fast. The ram can actually be much longer than
the LCD so scrolling is just setting the starting address of the
buffer. I know oftentimes I am writing the same data to the display
but it works great when the data is changing quickly.
I would also read the encoders on an interrupt as well as you described.
Dave
At 09:57 AM 2/1/2010, Antti Huovilainen wrote:
>On Mon, 1 Feb 2010, Tom Wiltshire wrote:
>
>>So if someone turns the rotary encoder really quickly, you can't
>>update the LCD before the encoder has moved again. This leaves you
>>having to choose between letting the LCD update finish before you
>>check the rotary encoder again (e.g. ignore the encoder) or check
>>the encoder but don't always bother to update the LCD if it's going
>>too fast (e.g. ignore the LCD).
>
>The correct way is to use a fastish (~500 Hz) timer interrupt to
>read the encoders and update the internal counters. Then the actual
>processing & display code can deal with them at whatever rate is
>appropriate. This way the worst that can happen is that some values
>are skipped over.
>
>Antti
>
>"No boom today. Boom tomorrow. There's always a boom tomorrow"
> -- Lt. Cmdr. Ivanova
More information about the Synth-diy
mailing list