Go Down

Topic: Precision Potentiomter (Read 1 time) previous topic - next topic

Docedison

360/256 = 1.40625 Deg/Step is the only real problem that I see and as to storage a 24C02 would be more than enough external storage and relieve the 328's eeprom cheap and easy to use too.

Bob
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

JoeN


360/256 = 1.40625 Deg/Step is the only real problem that I see and as to storage a 24C02 would be more than enough external storage and relieve the 328's eeprom cheap and easy to use too.

Bob


Like I said in my prior brainstorming thread, I wouldn't write the new rotary encoder position to the 328's EEPROM until a second or so has expired.  So you probably want to have an interrupt handler calculate the new position and set a flag saying the position is dirty and the time it became dirty.  Then somewhere in the main loop check that and after a second expires write it out.  If another interrupt comes in in under a second, the time is updated so the write never occurs until a second has passed.  This should cut down on the number of writes dramatically.
I have only come here seeking knowledge. Things they would not teach me of in college.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy