At 10:53 AM 12/06/2013, you wrote: >Better than that, thera are PIC microcontrollers with dedicated hardware >encoder counters (QEI) from microchip. I tried it on a dsPIC33EP64MC504 >with two QEI modules and it works fantastic. No one line of code needed, >just configure registers. You just read count register and, also (dsPIC33)= , >velocity! > >You can know wich micros have a QEI peripheral filtering here: >http://www.microchip.com/maps/microcontroller.aspx > >For 1 QEI, you have: dsPIC33, dsPIC30, PIC24 and a couple of PIC18. >For 2 QEI, you only have dsPIC33. > >If you are working with motors and encoders, take a look at >PIC24/dsPIC33xxxMCxxx series. Somewhat variable with part number, IIRC, but there are some serious errata on the dsPIC Microchip QEI module, to do with rollover and use of the index input. Worth looking at the ARM Cortex line if you need reliable operation at high speed (some encoders have nm resolution and move at macroscopic speeds, so it's best done in hardware). This issue cost us a lot of money. --sp --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .