Another option is to use the PortB interrupt on change capability. Attach both A and B to PortB pins that trigger the interrupt on change and you'll have a full four interrupts per period. If you want to just use the external interrupt pin and still get four interrupts per period, use an XOR gate to combine A and B, and when you get an interrupt toggle the interrupt trigger from rising to falling or falling to rising. -Adam Mccauley, Daniel H wrote: >Am I safe to assume that the typical PIC implemented optical encoder scheme >is to have the INPUT A of >the optical encoder connected to RB0 (Ext INTERRUPT) of the PIC and INPUT B >of the encoder connected to another pin >such as RB1? So that when RB0 detects a rising edge, the interrupt routine >would then check to see if INPUT B is high >or low to determine direction? > >Is this standard or do they use routines that trigger off both INPUT A and >INPUT B for double resolution??? Or possible they would only do this if they >needed twice the resolution? > >Thanks! > >D > >-- >http://www.piclist.com hint: To leave the PICList >mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu