Subject:
|
Interrupt routine question
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Thu, 18 Feb 1999 14:02:04 GMT
|
Original-From:
|
Darkman <LROSKA@CYBERUS.CAavoidspam>
|
Viewed:
|
1205 times
|
| |
| |
I'm trying to implement a hardware shaft encoder routine similar to the the one
described in the Mobile Robots Book for my Handy Board.
I'm using the pulse acumulator for the left encoder and TIC2 for the right shaft
encoder. They are both configured to increment the count on the rising edge of
the pulse. The shaft encoders are the reflective type with a resolution of 16
clicks /rev.
the output of the encoders is conditioned!
The problem I encountered is that there is a discrepancy between the pulse
accumulator count and the TIC2 count when the input pulse train goes beyond
a few cycles and both are fed by the same signal (testing purposes).
The pulse accumulator counts are greater than the TIC2 counts. However this
problem does not arise if I apply the pulses in a single step manner.
The TIC2 is serviced by an interrupt handler routine that is always running.
Question:
1) Is this problem caused by the interrupt handler routine missing a pulse?
2) Is it better to implement both shaft encoders in the same interrupt routine?
Any suggestions are welcome
Thanks in advance
Laz
--
MIME ATTACHMENTS DISCARDED:
1. Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Length: 2651
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|