-
pulsein comand
alright, for turn signals on rc car, using pic 16f84a
ive begun fiuring out how to read the servo motion, and since servos are run off pulsing a high signal, im guessing the best easiest way to read this signal, is the same comand i used on tha bs2,, pulseout, , only in this case pulse in, any one have some good reading material or input , describing this comand
i planed to getit to work by figuring out which pulse is slightly futher movement then triming nobs can procure, then use = or > than logic to achieve internal switching of the lights on or off, for instance to simplify
lets say trim nobs can prouduce movement to 3 milimeters off center, i figure out that pulse by manually makeing a servo move that much off the bs2,, now i have x and z pulses, where x is max trim to one extreme, and z is the other, giviing me a black out area to call zero, then i use logic to say if the pulse sent by the reciever is within certian levels its considerd a turn, if its between x and z pulses , then its considerd zero , and all lights are off,
does it sound like im going down the right path, and will pulseout / in comands transfer from bs2 coding to pic basic,
-
any sugestions on how to read a signal sent to a servo at all?
-
There's so many way to do it... i'm not so familiar with your kind of application but, IMO you can use PULSEIN with rotary encoder or opto-coupler.
OR you can use internal TIMER to get a accurate timing.
Some will also prefer to read a voltage instead of pulses. Converting pulse into voltage can be made with a simple RC circuit connected to a Buffer op-amp.
-
1 Attachment(s)
Picman, I have attached a very old program written for a Parallax basic stamp-I to decode a servo pulse stream and output a 5 bit binary byte. It also upon power-up reads the servo null position and subtracts it from the output. It also has a preset deadband for the output. Look it over and see how I solved the same problem.
HTH,
Dave Purola,N8NTA
-
-
is the only purely software method internal clocking? and if so , have any ideas of reading mateiral to help me get this going?
my dcumentation has explanition of pulsout,, not in