PDA

View Full Version : Pauses



Forkosh
- 16th November 2007, 03:47
How much pause should I allow before ( or after) pulsing out a servo command?
How much pause should I allow for an LCD to initialize?

and theoretically, If i were to send a pulse of 160 to servo1 and then immediately after send a pulse to servo1 of 190 , wouldn't the pulse be affected and changed to a pulse that is not 160 or 190?

Also, If I give a pulse of 150 and then clear the output and then give a pulse of 160, wouldn't the pulse given out be messed up?


P.S. I have created working code , but I'm just looking to see the "right" way of doing things.

Thanks,
Eric

I am using a PIC16F616 @ 4 mhz

BrianT
- 16th November 2007, 05:38
Google RC servo operation - there's plenty out there. Most RC model servos are designed to run with a nominal 50 Hz update rate. My JR transmitter sends 22 mSec frames so their update rate is a little slower than 50 Hz. Some can go faster, all can go slower, but the holding torque drops rapidly with update rates below about 25 Hz. This is brand and model dependent.

Each servo should see a position pulse from 1000 uSecs (fully one way) to 2000 uSecs (fully the other way) every 20 mSecs. The centre position is 1500 uSecs.

The gap between pulses, or the pause as you put it, should be a nominal 18.5 milliseconds after the nominal 1.5 mSec centre signal pulse.

Note that 'analog' servos are usially pretty tolerant of drive pulses less than 1000 or more than 2000 uSecs. 'Digital' servos on the other hand draw considerably more current whiile they are moving and if driven against the stops will literally melt the coreless armature in a few seconds. Personal experience with HiTec servos!

LCDs are usually quoted as needing 1 second to stabilise at first power up. No doubt your mileage will vary. You can set the command and data pauses in PBP LCDout command via defines which default at 2 mSecs.

HTH
Brian