Thread: Discussion FlySky/Turnigy 9X Protocol
View Single Post
Old Jan 16, 2013, 05:46 PM
ThierryRC is offline
Find More Posts by ThierryRC
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
78 Posts
that's it ! The receiver works quite well.

I decided to use internal oscillator that is in fact very accurate (I setup an interruption at 100hz to toggle an output pin and measured 100,00Hz with a frequency meter!). Of course it may shift with temperature...

The receiver can manage 6 servos. It is not so light (5gram) with standard servo connectors... but I planed to do a smaller version with smaller pic: pic16F1503 (14pin, 150mil wide, 1.27 pitch).

Servo pulse are done with an interruption procedure using 2 timers (one starts pulse sequence every 20ms, the other one counts pulse duration) and 2 indirect registers.
Quite a short interruption procedure (about 50 assembler instructions) but very accurate with 1 micro sec resolution.

When switch on the RX tries to bind with TX for 2.5s (led flashing at 12hz), if TX not found, then it uses previous TX id that was recorded (last successfull bind) in pic eeprom. then It follows hopping sequence (associated to TX id). Led is on when rx is ok, off if not...

Take a look at the program, I tried to put many comments in english.
(sorry for the english I'am french...)

things to take care if you want to develop your hown RX code with this protocol:

you have to substract one from all channels sequence number.
I mean, as an exemple, for binding procedure, RX listen on channel 0 (and not 1)
So I just decrement channel number after reading the table that contains channel sequence...

wait a few millisec after switch on to let the A7105 wake up !!!
everything worked with debugger and nothing worked with release version (?)
I spend an evening on that trouble and then realised that the only difference was that debugger was doing a soft reset (A7105 was allready on) ...

I can do a special software version for you, with ppm in place of servo6 output ?

you can download files at:

ok it's late, I need sleep...
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote