View Single Post
Old Sep 11, 2012, 07:49 AM
hammer22 is offline
Find More Posts by hammer22
Registered User
United States, NH, Exeter
Joined Oct 2010
99 Posts
I originally was using the start of the PPM frame as a timing reference. The same 16 bit timer that was timing the PPM pulses was also being used to trigger some key events like packet transmissions via a 16 bit capture compare module. The timer was being reset to zero at the start of every PPM frame. As the PPM frame got longer, so did the interval between packet transmissions. When the frame rate got above 22ms, the Spektrum receivers would stop working.

I fixed it by allowing the 16 bit timer to free run and instead of using time values referenced against zero for the Capture/compare module, I add a time offset to the capture/compare module to set them up for the next event trigger. This method takes advantage of the wrap around that happens when you add two 16 bit values together using a 16bit register for the results. The PPM pulse timing math is not bothered by the wrap around either. So now the packets are sent at a nice steady 21ms rate and the PPM frame rate can be anywhere up to the maximum value of the16 bit timer (65535 = 32.768ms).

I'll have to think about the DM8 trade though.

There is very little about the Spektrum DSM2 protocol available on the web except for what I posted in the DIY electronics forum a year+ ago. There is even less on DSMX. DSMX is basically DSM2 but using 23 channels instead of 2.

Sorry, but I don't know anything about the Hitec A9 protocol.
hammer22 is offline Find More Posts by hammer22
Reply With Quote