You're welcome!
Luciano
Is it possible to increment/decrement enc_counter by 10's or 100's once some threshold has been reached? My encoder is a front panel switch with pushbutton which is used to select and change setpoints, turning the switch 32000 times can't be good for its lifetime not to mention my hand.
Hi,
I'm not sure I understand your problem.
* * *
Set the variable enc_counter to 30000.
If the encoder does one step you will
have either 29999 or 30001 in enc_counter. (CCW or CW).
The interrupt assembly code only decrements or increments
the 16 bit value stored in the variable enc_counter.
Is up to your PicBasic code in the main program loop to do
something with the value stored in the variable enc_counter.
Best regards,
Luciano
Last edited by Luciano; - 29th October 2005 at 21:44.
Bookmarks