Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

dealing with quadrature encoder

Status
Not open for further replies.

ayhampic

Member level 1
Joined
Aug 3, 2011
Messages
40
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,599
i'm using a 1000 ppr encoder , which generate 4000 ppr in x4 encoding .. it work fine in lower speeds .


- is there any quadrature decoder IC for that (except LSI )? I've read the HCTL-XXXX and they aren't capable of generate an interrupt ?
- have any one faced this problem ? any suggestions would be approciated ..
 

For high speed decoding, you preferably use a PIC with built-in quadrature decoder.

Your code is decoding the overrun condition CUR ^ PRE == INV, but ignoring it. The code seems to miss up/down decoding. It should be implemented even for unidirectional operation to achieve correct counting with bouncing or or unclear level input signals.

You didn't tell, at which rotational speed overrun is observed.
 

hi , thanks for reply

What should I do for the CUR ^ PRE == INV , and the overrun is observed if I rotate the encoder with my hand rapidly , but in calculation , depending on the ISR time which is 80us , the pic should be able to work with speed of 10RPS = 600RPM = 10 x 4000 pulses = 40,000 pulses per second , then the time between ISRs would be 25us and it is enough .
regards
 

I would detect the overrun condition, and e.g. mark the speed measurement as invalid. It's at least helpful in debugging system operation.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top