HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Aug 14, 2012, 02:06 AM
Registered User
slebetman's Avatar
Malaysia, Selangor, Kajang
Joined Jun 2009
1,410 Posts
Quote:
Originally Posted by PhracturedBlue View Post
already done in the Deviation firmware
Can you post the full 256 patterns? I'd love a copy.
slebetman is offline Find More Posts by slebetman
Reply With Quote
Sign up now
to remove ads between posts
Old Aug 14, 2012, 07:33 AM
Registered User
Joined Jan 2012
682 Posts
Quote:
Originally Posted by slebetman View Post
Can you post the full 256 patterns? I'd love a copy.
I didn't do it that way. It is probably easier to just look at the code here: https://bitbucket.org/PhracturedBlue...flysky_a7105.c
But here is a summary
Code:
static const u8 tx_channels[16][16] = {
  {0x0a, 0x5a, 0x14, 0x64, 0x1e, 0x6e, 0x28, 0x78, 0x32, 0x82, 0x3c, 0x8c, 0x46, 0x96, 0x50, 0xa0},
  {0xa0, 0x50, 0x96, 0x46, 0x8c, 0x3c, 0x82, 0x32, 0x78, 0x28, 0x6e, 0x1e, 0x64, 0x14, 0x5a, 0x0a},
  {0x0a, 0x5a, 0x50, 0xa0, 0x14, 0x64, 0x46, 0x96, 0x1e, 0x6e, 0x3c, 0x8c, 0x28, 0x78, 0x32, 0x82},
  {0x82, 0x32, 0x78, 0x28, 0x8c, 0x3c, 0x6e, 0x1e, 0x96, 0x46, 0x64, 0x14, 0xa0, 0x50, 0x5a, 0x0a},
  {0x28, 0x78, 0x0a, 0x5a, 0x50, 0xa0, 0x14, 0x64, 0x1e, 0x6e, 0x3c, 0x8c, 0x32, 0x82, 0x46, 0x96},
  {0x96, 0x46, 0x82, 0x32, 0x8c, 0x3c, 0x6e, 0x1e, 0x64, 0x14, 0xa0, 0x50, 0x5a, 0x0a, 0x78, 0x28},
  {0x50, 0xa0, 0x28, 0x78, 0x0a, 0x5a, 0x1e, 0x6e, 0x3c, 0x8c, 0x32, 0x82, 0x46, 0x96, 0x14, 0x64},
  {0x64, 0x14, 0x96, 0x46, 0x82, 0x32, 0x8c, 0x3c, 0x6e, 0x1e, 0x5a, 0x0a, 0x78, 0x28, 0xa0, 0x50},
  {0x50, 0xa0, 0x46, 0x96, 0x3c, 0x8c, 0x28, 0x78, 0x0a, 0x5a, 0x32, 0x82, 0x1e, 0x6e, 0x14, 0x64},
  {0x64, 0x14, 0x6e, 0x1e, 0x82, 0x32, 0x5a, 0x0a, 0x78, 0x28, 0x8c, 0x3c, 0x96, 0x46, 0xa0, 0x50},
  {0x46, 0x96, 0x3c, 0x8c, 0x50, 0xa0, 0x28, 0x78, 0x0a, 0x5a, 0x1e, 0x6e, 0x32, 0x82, 0x14, 0x64},
  {0x64, 0x14, 0x82, 0x32, 0x6e, 0x1e, 0x5a, 0x0a, 0x78, 0x28, 0xa0, 0x50, 0x8c, 0x3c, 0x96, 0x46},
  {0x46, 0x96, 0x0a, 0x5a, 0x3c, 0x8c, 0x14, 0x64, 0x50, 0xa0, 0x28, 0x78, 0x1e, 0x6e, 0x32, 0x82},
  {0x82, 0x32, 0x6e, 0x1e, 0x78, 0x28, 0xa0, 0x50, 0x64, 0x14, 0x8c, 0x3c, 0x5a, 0x0a, 0x96, 0x46},
  {0x46, 0x96, 0x0a, 0x5a, 0x50, 0xa0, 0x3c, 0x8c, 0x28, 0x78, 0x1e, 0x6e, 0x32, 0x82, 0x14, 0x64},
  {0x64, 0x14, 0x82, 0x32, 0x6e, 0x1e, 0x78, 0x28, 0x8c, 0x3c, 0xa0, 0x50, 0x5a, 0x0a, 0x96, 0x46},
};
...
    chanrow = id % 16;
    chancol = 0;
    chanoffset = (id & 0xff) / 16;
...
[for each packet]:
    channel = tx_channels[chanrow][chancol]-chanoffset;
    chancol = (chancol + 1) % 16;
PhracturedBlue is offline Find More Posts by PhracturedBlue
Reply With Quote
Old Aug 14, 2012, 05:13 PM
Registered User
slebetman's Avatar
Malaysia, Selangor, Kajang
Joined Jun 2009
1,410 Posts
Quote:
Originally Posted by PhracturedBlue View Post
I didn't do it that way. It is probably easier to just look at the code here: https://bitbucket.org/PhracturedBlue...flysky_a7105.c
Thanks
slebetman is offline Find More Posts by slebetman
Reply With Quote
Old Sep 05, 2012, 10:26 PM
Registered User
Joined Nov 2007
9 Posts
anyone knows the value of this capacitor??
ktgohdt125 is offline Find More Posts by ktgohdt125
Reply With Quote
Old Sep 05, 2012, 10:43 PM
Registered User
Joined Jan 2012
682 Posts
Quote:
Originally Posted by ktgohdt125 View Post
anyone knows the value of this capacitor??
The docs say that it should be 22pF for the reference design, but I didn't measure it.
PhracturedBlue is offline Find More Posts by PhracturedBlue
Reply With Quote
Old Dec 10, 2012, 03:11 PM
Registered User
Joined Dec 2012
28 Posts
Hi,

I read all this discussion. I am realy impressed by all the work you have done! Your job seams to focus on TX's turnigy but I'm looking for information about Rx.

My projet consist to build a small RX which can provide PPm output rather than have 8 ch PWM output. Could anyone explain what process going in the RX?

I guess it should match TX process but many parts did not appear clear to me...

- What is the data save in EEprom on the RX? (ID of TX? A1705 calibration?)
- The RX uC should probably identify the ID after Bind. Is that right?
- Does the frame for 9 CH also contains 11 words?

Thank you for taking time!
Surfbreizh is offline Find More Posts by Surfbreizh
Reply With Quote
Old Dec 10, 2012, 03:26 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by Surfbreizh View Post
My projet consist to build a small RX which can provide PPm output
welcome to rcg.

there is already a flysky rx already with ppm out. id like to implement a diy rx for cost and size reasons. problem is rx is much more difficult due to the binding/hopping issues.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Dec 11, 2012, 06:12 AM
Registered User
Joined Dec 2012
28 Posts
Thanks,

As you said, Flysky Rx already exist with ppm out but i would like to reduce the size. It seams very similar tout our project.

What issues binding/hopping do you talk about? Could you be more accurate?
Surfbreizh is offline Find More Posts by Surfbreizh
Reply With Quote
Old Dec 11, 2012, 07:38 AM
Registered User
Joined Jan 2012
682 Posts
Quote:
Originally Posted by Surfbreizh View Post
Thanks,

As you said, Flysky Rx already exist with ppm out but i would like to reduce the size. It seams very similar tout our project.

What issues binding/hopping do you talk about? Could you be more accurate?
I don't see any issue building an Rx for Turnigy protocol.
You need to save the GUID after binding. You need to be able to enter binding mode via some sort of user interaction (bind plug or whatever)
You need enough ROM for the frequency-hopping table.
The implementation should be pretty straight-forward after that. I don't see any real issues with building an Rx. In fact that is why I spent the time populating the entire frequency hopping table.

To answer your other questions:
Turnigy only supports 8Ch through the 2.4GHz protocol.
You don't need to save A7105 calibration. It is part of the power-on sequence

Note that the latest documentation is in the Deviation docs dir. The 1st post is not complete as it is now.
PhracturedBlue is offline Find More Posts by PhracturedBlue
Reply With Quote
Old Dec 11, 2012, 01:18 PM
Registered User
Joined Dec 2012
28 Posts
I think, I do not have all informations to do it on my own.

I have plenty of questions . I guess some will look a bit stupid... But let start :

- Is the frequency-hopping table linked to the ID? ( I assume yes.. :x) )

It is not clear for me what 's happening in the RX while the Bind mode is on. I know that it is done for save the ID of Tx but i don't understand how it is done..
Surfbreizh is offline Find More Posts by Surfbreizh
Last edited by Surfbreizh; Dec 11, 2012 at 01:34 PM.
Reply With Quote
Old Dec 11, 2012, 01:29 PM
Registered User
Joined Jan 2012
682 Posts
Quote:
Originally Posted by Surfbreizh View Post
I think, I do not have all informations to do it on my own.

I have plenty of questions . I guess some will look a bit stupid... But let start :

- Is the frequency-hopping table linked to the ID? ( I assume yes.. :x) )

It is not clear what 's happened in the RX while the Bind mode. I know that it is done for save the ID of Tx but i don't understand how it is done..
it would be best to read an understand the Deviation code implementing the Tx it is not very large. The Rx will work much the same, but with receieve vs transmit commands.

During binding all communication happens on channel 1, so just set ch# to 1 and listen for the data. you need the GUID.
then look up the proper sequence based on the GUID in the table, and listen on the 1st channel until you see a signal from the tx. Wow proceed forward switching channels every 1.46msec. There are various algorithms that can be used to sync between the tx and rx that may be more reliable in a noisy environment.
PhracturedBlue is offline Find More Posts by PhracturedBlue
Reply With Quote
Old Dec 11, 2012, 03:10 PM
Registered User
Joined Dec 2012
28 Posts
Ok, that helps me a lot.

I read the Flysky.txt and try to adapt it for RX mode. Then, I'll be glad to share it. I noticed some tricky part like Program the A7105 control registers and I am wondering for exemple, if RX use FIFO mode as well or direct mode.

Thank you for your help. Now, I have a lot to read .

Have a nice day!
Surfbreizh is offline Find More Posts by Surfbreizh
Reply With Quote
Old Dec 21, 2012, 11:55 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
i finally got a rx working (half gram $3 cost) but noticed something interesting. it works with the 30 or so v911 radios i tried but not the 2 v939 radios. it looks like they dont share the same protocol which might explain why nobody has got the v939 5th control channel working with turnigy 9x. a quick look at the spi train shows things going awry after the 2nd data byte. i plan to look into that in more detail later but for now its doing ok with the radio i use most. very odd they use different protocols for the 2 products though.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Dec 22, 2012, 07:28 AM
Registered User
Joined Jan 2012
682 Posts
Quote:
Originally Posted by dave1993 View Post
i finally got a rx working (half gram $3 cost) but noticed something interesting. it works with the 30 or so v911 radios i tried but not the 2 v939 radios. it looks like they dont share the same protocol which might explain why nobody has got the v939 5th control channel working with turnigy 9x. a quick look at the spi train shows things going awry after the 2nd data byte. i plan to look into that in more detail later but for now its doing ok with the radio i use most. very odd they use different protocols for the 2 products though.
The 939 has a 5th channel? I have one, but bought it bnf. seems to work fine with deviation, but I only used 4 channels. Unfortunately since I don't have a tx, I can't capture the necessary logs to see what is going on.
PhracturedBlue is offline Find More Posts by PhracturedBlue
Reply With Quote
Old Dec 22, 2012, 09:11 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
Thanks a lot to all of you for the amazing job you have done !

I also wanted to analyse this protocol and I knew it would be hard job, so I'am very happy to find this thread.

Just like Dave1993, I would like to do a very small RX, and perhaps a small TX 9x compatible. I have allready ordered some A7105 board from "www.electrodragon.com" (have a look to this site they have very cheap small analog joysticks, nokia display screen, ... all you need to do a TX from scratch)

Dave1993: is your board (small receiver) based on an Atmel or Microchip ic ?
I'am used to work with Microchip ic's. Are you ready to share your code ?

Thierry
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question 9X - FlySky/iMax/Turnigy/Eurgle FOR DUMMIES aeajr Radios 1011 Yesterday 04:22 PM
Discussion Benefits of buying FlySky TH9x (v2) over Turnigy 9x (v2) wwfisher Radios 68 Oct 27, 2014 05:36 PM
Found turnigy 9x/flysky 9x wanted!!! kremecheze Aircraft - General - Radio Equipment (FS/W) 2 Mar 25, 2012 04:04 PM
Wanted ER9x or Turnigy/Flysky 9x daign FPV Equipment (FS/W) 0 Mar 22, 2012 06:21 PM
Found Turnigy/FlySky/Eurkle/etc 9X Shell flyandi Aircraft - General - Radio Equipment (FS/W) 0 Mar 11, 2012 06:12 PM