Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - RC servo

(you are viewing a thread; or go back to list of threads)

RC servo (by MAX)
I was wondering if it's possible to read a signal from an RC receiver, the signal is a pulse variation from 1mS (full CCW rotation) to 2mS (full CW rotation) and 1.5mS for neutral position, will LdMicro be fast enough to read this ?

I want to build an electronic speed control for a radio controlled car with forward, reverse and brake

Thanks, Jonathan for this nice piece of software !!!
Sat Jan 30 2010, 00:37:51
(no subject) (by MAX)
II will try to reformulate my question,

I'm trying to measure a pulse width... the signal is a pulse every 20ms and that pulse vary from 1ms to 2ms in width, I know that I could use an (hardware solution) a binary counter (ex; cd4040) and measure the pulse duration by counting the pulse of an other know frequency...

But I'm looking for a (software solution) ???

any Idea?

If it's not possible, would be nice to implement this instruction to a future release of LdMicro, this might not be useful for every one, but really nice for RC, robotic applications and other stuff


Thanks
Thu Feb 4 2010, 19:14:51
(no subject) (by David R)
Hi Max,

I don't think that the pic scan time will be fast enough
to be useful with this.

I would use some 4000 logic to measure the length of the
RC timing pulse.

when the pulse goes high then it gates A clock into A 4040? counter which counts the time that the pulse was high
when the pulse goes low again the pic can read the bin out of the 4040 chip and process the data using maths etc also
the pic would output A reset pulse to the 4040 chip to reset the counter ready to take the count next time the RC pulse goes logic high.

Hope this helps,
Regards
David.
Tue Feb 16 2010, 00:42:54
(no subject) (by BoumPower)
Hi David

"I don't think that the pic scan time will be fast enough"
PIC with cristal 4MHz operate at 1uS for 1 instruction... at 20MHz, it's 250nS.

With assembly programming or timer/counter use think it's possible.

But you need real-time programming with small tasks... it's not the way of the current version of LDmicro. I'm writing a small compiler to allow the use of ladder logic in lo-priority task in a multi-task system.

Best regards

Olivier
Tue Feb 16 2010, 14:27:52
(no subject) (by MAX)
@ David

Thanks for your answer, this is exactly what I tough... if I go this way it will require external components for the "prescaler". Anyway, I found a code on the net for PIC12f675 with everything I need on it and it use the built-in 4mhz oscillator, If someone is interested, you may find it here...

http://www.designsoft.com.au/ahome/rc/PIC-CarESC/


@ BoumPower

Sound really interesting !!!
Would be nice to be able to build "Macros" for specific simple task like this one... and many, many other...

Good luck !
Wed Feb 17 2010, 10:00:18
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):