Your assumptions and understanding are exactly correct. You can also change the interrupt edge on the fly so that you can detect both rising and falling edges on A. This will give you two counts per period. Basically there are three techniques: - process one edge of one signal: one count per period - process both edges of one signal: two counts per period (double resolution) - process both edges of both signals: four counts per period (quad resolution) Bob Ammerman RAm Systems ----- Original Message ----- From: "Mccauley, Daniel H" To: Sent: Monday, April 21, 2003 9:07 AM Subject: [PIC]: Typical Quadrature Optical Encoder input scheme??? > 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