Propeller as PPM encoder...
Can anyone tell me if the Propeller is fast enough to encode an 8 channel PPM pulse train every 25ms or so?
I'm trying to replicate a bit of hardware I have that takes a 19,200 baud input and translates it to and 8 channel pulse train that is fed into the
trainer jack of a "standard" R/C transmitter.
If the Propeller can do the job, has anyone done this already? If so, care to share the code? [noparse]:D[/noparse]
Thanks all.
g.
I'm trying to replicate a bit of hardware I have that takes a 19,200 baud input and translates it to and 8 channel pulse train that is fed into the
trainer jack of a "standard" R/C transmitter.
If the Propeller can do the job, has anyone done this already? If so, care to share the code? [noparse]:D[/noparse]
Thanks all.
g.
Comments
However I doubt somebody made something so specific.
Granted, there's an object for the 19.2 baud serial communication.
Best of luck
Lawson
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?
g.
The closest thing that I might have is an object that I played around with when I first received a Propeller.· It was a 6 Channel PCM signal, where I·directly drove the RC-transmitter off of a Propeller pin.
Each channel required a 300us Stop pulse (LOW) followed by a Data pulse ranging from 750us to 1750us, making the worst case requirement for each channel to be 2050uS.·· Multiply this by 6 Channels and you get 12.3ms... or 8 Channels in your case and you get 16.4ms.
Since the repeat interval comes around every 20ms-30ms you have about 3.6mS of overhead worst case.
If you want to transmit at 19.2 Baud to set the channel values, that's only 520.8us per Byte of data... with 3.6mS overhead, you could "fit" about 6 bytes of data (almost 7)
·
Now, take this into consideration..... The possible scenario above only references using 1 COG, with the Propeller you have 8 COG's to choose from, so you wouldn't necessarily need to interleave receiving data with the output pulse.
·
Note: The output signal characteristics of your transmitter will most likely·vary from the transmitter that I used.· Without overloading your transmitter, you can connect a 10Meg resistor from your transmitters’ antenna·to a scope, and visually see what your signal characteristics may look like.· Also, ground the scope to your transmitters ground (or negative supply) while making this test.·
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
The output is going to a Hitec Prism 7 transmitter. The baud rate I quoted was the max rate that this device can handle. Can I assume that if I crank the rate up to 38400 or higher then there would be more "room" to accomodate the 8 byte stream? (each byte is a servo position for each of the 8 channels)
I need to look into actually getting a Propeller now. [noparse]:)[/noparse]
Thanks!
g.
"Can I assume that if I crank the rate up to 38400 or higher then there would be more "room" to accommodate the 8 byte stream?" - Yes, but you wouldn't need to if you used a second COG.· One COG would receive whatever signal you gave it and update·values in memory, ·the second COG would read the values in memory, and create the proper pulse stream.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.