To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 6472
6471  |  6473
Subject: 
RE: r/c servos and firmware
Newsgroups: 
lugnet.robotics
Date: 
Fri, 20 Aug 1999 22:22:12 GMT
Viewed: 
626 times
  
Ok, Here's my 2 cents on servos...read to the bottom if you are
interested in helping to develop the code for this.

OhOh, I've piqued my own interest. I've looked at the H8 hardware manual
and the RCX internals. The OC1A triggers every msec, except the stupid
routine clears the Free Running Timer every time!!!! So much for using the
OC1B, maybe.

The minimal pulse is 1 msec, right?
And the maximal pulse length is 2 msec right?
And we need about 60 Hz (approx) right?

What about this...

1. "Wedge" a custom OC1A interrupt service routine into the existing
   slot - remember TSR programming on PCs?
2. Every 3 times (3 msec) turn on a motor output.
3. The next time, set OC1B to expire at a sub 1msec interval.
4. When OC1B interrupts, turn off the motor.

Total elapsed time is about 5 msec, multiply by three for 3 motors
and you have 15 msec, and about 60Hz!

The pulses range from just over 1 msec to 2 msec in about 500 intervals,
which is WAY more than needed.

Just remember not to turn on a motor when it is in servo mode!!! This could
be made interlocking in pbFORTH

If there is enough interest, I'll try getting something running soon...

Cheers,

Ralph Hempel - P.Eng

--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbFORTH>
--------------------------------------------------------
Reply to:      rhempel at bmts dot com
--------------------------------------------------------



Message has 1 Reply:
  Re: r/c servos and firmware
 
(...) Almost exactly how I'd do it. The problem is what if OCIB must be set to a small value, and the FRT has already passed this value when the OCIA handler sets up OCIB in step 3? This problem is solvable. If the total interval is closer to 1 ms, (...) (25 years ago, 20-Aug-99, to lugnet.robotics)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR