| ??? 12/06/00 01:26 Read: times |
#7003 - RE: Digital encoder |
Hi all!
Thanks for all your ideas about digital encoders ("alias digipot"). I copied the code examples, and will print them out to studying them in details. At this moment I find them very efficient and useful. To this point my code is called upon a timer interrupt branching every 1.1ms. In the int. routine, I put a software "multitasking", as a variable increased by 1 every interupt entry from 0 to 4 and then reset. When the varible is 0 and 2, I call the encoder read routine (the other is filled with DAC updates and so on). That makes it possible to read the A and B lines so added together the final code will be 4 bits. A lookuptable for the code pattern returns a byte code for witch movement the encoder is in. Like: 0000 or 1010 = No movement. 1011 = Clocwise direction. 1000 = Anticlocwise. 1100 = Not valid. There is totally 16 patterns to determine. As I mentioned, it works fine, but it's hard to reed if I turn the encoder fast. The problem is that debouncing has to be taken care of, so the redings of the lines can't be done faster than every 2ms (Bourns spec.5ms max). Best Regarding John E. Finnekåsa |
| Topic | Author | Date |
| Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| Wrong counts, Debouncing | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
| RE: Digital encoder | 01/01/70 00:00 | |
RE: Digital encoder | 01/01/70 00:00 |



