Pages: 1 [2]   Go Down
Author Topic: Problem reading an encoder correctly  (Read 1113 times)
0 Members and 1 Guest are viewing this topic.
South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1023
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you try to use any other method other than interrupts you will not be able to do anything else because of the non-controllable timing of the transitions of the encoder signals. If they are that predictable then they aren't really needed.

Interrupts will keep counters abnd such updated without any interaction form you. You can use the value that is set to do whatever work you want done.

The higher the frequency of interrupts the slower other processing will take place, but it is assumed that you really want the encoder to give you very accurate results. If the encoder frequenct is too high then you might consider going to a lower count encoder and lowering the interrupt overhead. More (as encoder counts) is not always better, especially when you have limited processor power to deal with the interrupt and other functions.

I have worked on OLD CNC machines that used 50 line encoders because they lacked the processing power that would have been required for higher count encoders. Used on Oxy-fuel cutters and did a great job.
Logged

Pages: 1 [2]   Go Up
Jump to: