Main Site Documentation

Advice creating PPM signal to contol Spektrum DX7


Hi, does anyone know the best way i should go about creating a PPM signal that is capable of controling a Spektrum DX7 via the buddy input?

I have managed to get it to work using output compare and giving the correct timings to create the signal but once the outputcompare is set i cannot change the timings without doing another set which breaks the ppm frame timing due to the overhead involved with the set method.

I have had it hooked up to an oscilloscope and when i set the ouput compare to repeat it performs perfectly and a nice signal is generated, but when i had it set up so that i could change the timings everytime i did a set call the signal would jump which upsets the transmitter.

is output compare the best way to generate the signal?



You can make your own version of OutputCompare that take new values at runtime.This can be done using RLP and particularly using a “task” in kernel mode.


OutputCompare is good for most simple wave generation and doesn’t require you to go into RLP. Doing your own OutputCompare however is quite simple. As Gus said create a procedure in C that will save your timings array in a public variable and schedule a new Task. When this task is triggered it will be responsible for setting output high and schedule the oposite task that will set the output low. Each task should be triggered with delay according to your saved timings array (look into RLP documentation about scheduling Tasks with delay). Than just add another procedure that is able to change values in the timings array and there you go.


In addition, since there is known purpose, You can do it even better:

You can save all the frame in public variable (array) and have a functions for changing every signal (array member you want). Then you just have a variable with frame position. When Your task ‘hits’, You just update position (++ or begining of a frame).


Where do i find the documentation for the RLP stuff? do i have to do anything special to use it? i thought i read somewhere i would have to get the module unlocked?


This is a good tutorial:

but don’t use the links to download examples. Download them from bottom of the documentation:


Also to get your key to unlock RLP visit:


Thanks guys, the RLP stuff works perfectly