Subject:
|
Re: Servo Routines
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Tue, 14 Apr 1998 16:21:53 GMT
|
Original-From:
|
Chuck McManis <cmcmanis@freegate.SAYNOTOSPAMcom>
|
Reply-To:
|
{cmcmanis@freegate.}antispam{com}
|
Viewed:
|
1398 times
|
| |
| |
I have noticed in my experiments that the HB servo routines don't
interact well with the LCD. In order to get them to work reliably
in my Handyboard library I redesigned the way the LCD driver
worked. Unfortunately for you that library was built for icc11,
not IC so it won't help you.
However, if someone else wants to fix this for the general case,
here are the steps.
1) In my case the problem arose because the LCD driver does a
busy loop waiting for the LCD to be done before it writes a
character. Depending on where in the cycle you 'hit' it, you can
wait anywhere from 0 to 1mS.
2) The servos get to run when their controlling timer interrupts,
however, because the LCD driver has to run in single chip mode,
it is required to disable interrupts for its duration.
I made things better in my driver by rewriting the LCD driver to
be asynchronous. Basically the lcd_write routine queues a
character to the LCD and then during system ticks the LCD driver
checks the queue, and if it is non-empty, attempts to write one
character. The magic is that if the LCD is busy it just returns
immediately, assuming it will pick up the character on the next
systick. That made the interrupt response time to the servos MUCH
more predictable and I could run three with no chatter at all.
The down side is that sometimes you will may wait nearly 2ms to
write to the LCD however that is still a rate of 480 characters
per second so its still more than too fast for humans.
--Chuck
|
|
Message is in Reply To:
| | Re: Servo Routines
|
| When I see the servo chatter, the knob is returning the same value. In fact I can just set a constant unchanging value without using the knob and get the chatter. I've tried this on two HB's and get the same results. The servos are small Futabas. (...) (27 years ago, 13-Apr-98, to lugnet.robotics.handyboard)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|