Henrik shared some code here that may give you an idea or two.
http://www.picbasic.co.uk/forum/showthread.php?t=11683
Henrik shared some code here that may give you an idea or two.
http://www.picbasic.co.uk/forum/showthread.php?t=11683
Dave
Always wear safety glasses while programming.
Thank you I also did a search (dah) of the fourm and found that if I & the two bits it will give direction I will look all this over and repost if I don't get it.
thanks again
Just so I don't mess anyone up here,This is what will work for me.
Using Xor will give direction.
take the righthand bit of your old value xor it with the lefthand bit of the new value.
if your xor value is 0 the knob is turning clockwise
if your xor value is 1 the knob is turning counter_clockwise
Bookmarks