View Single Post
  #2 (permalink)
Old 28th June 2008, 02:09 PM
reachrkata
CE - Regular Member
 
reachrkata's Avatar
 
Join Date: 4th November 2006
I'm a Crazy Electronics Engineer
Posts: 83
Talking Re: Encoder data: How to interpret encoder data from a motor going into the PIC16F877

An Encoder normally works like this.

1) Channel A is connected to a processor interrupt for LOW->HIGH transition.

2) When the interrupt is detected, the status of Channel B is read. If Channel B is LOW, this means that the encoder was turned one step in Clockwise. If Channel B is High, then the encoder was turned one step anticlockwise.

3) You can maintain a counter variable which counts +1 for each clockwise and -1 for each anticlockwise.

4) In the case of IE2-512, there are 512 encoder steps in 1 turn (360deg) of the encoder.

I hope this clarifies eveything.

-Karthik
reachrkata is offline   Reply With Quote