Hi everyone
I am trying to interface a rotary encoder with lpc2148. i am unable to identify the pattern clockwise and antilclockwise. I am configuring P0.28 and P0.29 as Gpio and connecting it to the rotary encoder. if there is a change in the pins due to the rotary encoder state change it stands only in "low " or High. it doesnot follow any pattern as mentioned in the data sheet . Any suggestion or any idea about this would be helpful.
is it an encoder with incremental outputs ABZ(MFG?)? IF so A and B is 90 degree shifted in phase and a change in phase is a direction change. The pattern should look like
that is the standard for incremental encoders. There are of course other interfaces, like analog Sine/Cosine or digital serial or parallel output. On the digital interface there are open standards, like the SSI/BiSS interface( https://biss-interface.com/ ) or proprietary interface (could be more then 10). If you have a datasheet from your encoder it should describe what is outputted.
The rotary encoder i am using does not follows the predefined pattern for clockwise and counterclockwise. The state of change gray code is like this 11->00->10->11, for both forward and reverse rotations. The Rotary encoder i use has 5 pins, pullup resistor value=10k. I have attached the code with this , can anyone suggest where i am going wrong.
hi all
The part no of the rotary encoder i am using is EC11. it oddly behaves staying stable only in either 00 or 11. it pass through the states 01 and 11. what may be the issue. can any one suggest
hi everyone
I got the rotary encoder working , the code pattern for forward is 00->01->11->10->00, and for reverse the code pattern 00->10->11->01->00. i found out the pattern by configuring the pins as GPIO. i am using lpc2148.i need a suggestion , whether i need to continue to identify the pattern as configuring the pins as gpio or need to move to interrupt.