HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Feb 06, 2013, 10:50 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
v911 was my main radio too. and you had that devo hack to change ids. i had no custom tx but lucky to have two 9x, two t6, a v929, and over thirty v911 (thanks tmart!). ive got less convenient access to the 200 and some bought for the school and dozens friends and relatives with 9x, x1, v9xx, etc. thats probably why theres more opportunity for me to find incompatibilities.

ive developed several alternate methods that appear to work better: 16 byte table instead of 256 and also algorithmic instead of lookup. mostly because there was no room for 256 byte table in my t13 based 150mg diy version. they do all the radios but theres still a code space issue there so it would be interesting to see if a more efficient method exists.

anyway ill repeat that i never would have got anything working w/o this thread so thanks again.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 06, 2013, 05:09 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,609 Posts
It is confusing and nobody explained properly.
1. The A7105 ID is sent 0x2AC57554 - LSB first
2.The TX ID aka ThieryRC TX ID is sent 0x30000006 - LSB first.

Quote:
Originally Posted by dave1993 View Post
correct-a-mundo. (so you ARE getting the hang of this!) although i do prefer to call it 06 00 00 30 like the radio itself does.
midelic is online now Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 07, 2013 at 10:40 AM. Reason: hex corected
Reply With Quote
Old Feb 06, 2013, 06:37 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by midelic View Post
It is confusing and nobody explained properly.
1. The A7105 ID is sent 0x2AC57554 - LSB first
2.The TX ID aka ThieryRC TX ID is sent 30 00 00 06 - LSB first.
actually was explained here and the amicom spec sheet and i dont think thats the correct order as shown. at least not my flysky radios. i did chase my tail quite a bit because it was not always clear how the bytes should be sent/received so you are not alone.

alternate number systems, specially hex, can be confusing unless people decide on a standard to communicate. hard enough for us with 3 native languages involved. little endian or big endian but not both at the same time. maybe separate the bytes to show how it comes out of the tx or, if for some odd reason you want to depict as a single number, use 0x. so to be proper:

06 00 00 30 = 0x30000006

54 75 c5 2a = 0x2ac57554

ps looking at the sample "avr program" you posted a while back i see theres room for improvement. again, suggest blinking led and hello world as good first steps instead of spi and a7105 ids. if youre serious about coding i suggest a new thread titled "do you want to learn avr assembler?" so this one dont get cluttered with noobness and windbags like me going on and on.
dave1993 is offline Find More Posts by dave1993
Last edited by dave1993; Feb 06, 2013 at 06:58 PM. Reason: new thread?
Reply With Quote
Old Feb 07, 2013, 05:40 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,609 Posts
Dave,
Regarding the hex number I know hex numbering, I was only copy and paste from thierryRc post was too lazy to write the numbers myself.Anyway you are the master of "Gobbledygook" jargon and ..........you know that.I didn't find other word and this one sound cool.
About languages I know also 4 and I want to add more.
Secondly ,that is not all the code.It is only a sample and I know there is room for improvement in fact this advice is valid for everybody.
Don't worry. I' ll finish the code soon, I'm almost there,at least for the binding part.Avr assembler is not so complicated and I learned(almost 70%) it in less than one week,it was the less difficult part .It was a little more difficult the understand A7105 data sheet(still learning) and now to understand the flysky protocol.
About new thread,this is an RC forum so is not the right place to start with.Secondly even on the right thread ,they advise the same as you at the beginning,and that kind of advice I don't need atm.
However, don't worry I'll never ask you anything here or there ,about avr assembly,In fact I don't need it atm,I have very good resources for that and where to look for.Sorry for ask you about that ,it was a mistake,I was too lazy at that time to look for myself.

If you want to have a bet with me ,if I finish my code in avr assembler and tested working.........??
midelic is online now Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 07, 2013 at 06:45 AM.
Reply With Quote
Old Feb 07, 2013, 09:14 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
calm down. i do want to thank you for all the questions youve allowed me to answer last couple years. its been a privilege. anyway atm my opinion is based on that code you just posted. maybe i underestimate you. maybe not. seriously: you are obviously smarter than me learning in one week what took me two years. and i only know one language. no bet on flysky ppm code (i cant wait til retirement to collect. lol!). but i would like to see your avr asm blink and hello world. not copied but original versions. and functional stand alone...not snippets. you must know they are both critical debugging tools for your current project so must already be done.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 07, 2013, 02:46 PM
Registered User
United States, ID
Joined Sep 2011
420 Posts
Quote:
Originally Posted by dave1993 View Post
if youre serious about coding i suggest a new thread titled "do you want to learn avr assembler?" so this one dont get cluttered with noobness and windbags like me going on and on.
If you want to learn assembly you'll always be cluttered with old windbags going on and on.

I'd suggest learning a real programming language, like C. It's a basic requirement for any serious programmer.
jakestew is offline Find More Posts by jakestew
Reply With Quote
Old Feb 07, 2013, 03:32 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,609 Posts
So if I start learning "C" and share here,I'll not be "clobbered" at all.Lol!
Forget about it.Let's stay on topic.
I just wait for Thierry Tx pic code.
midelic is online now Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 07, 2013 at 04:29 PM.
Reply With Quote
Old Feb 07, 2013, 06:38 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by jakestew View Post
If you want to learn assembly you'll always be cluttered with old windbags going on and on.

I'd suggest learning a real programming language, like C. It's a basic requirement for any serious programmer.
speaking of windbags jake you are the king. cant count the number of posts where you complain that this or that is no dam good and somebody should do something. then you proceed to do huge amounts of.... nothing.

i did get a kick out of your advice that homemade copper soldering tips are better than even the $1 ebay iron clad. and the guy you told to regulate his high current app with a voltage divider. i think that pretty much says it all.

and regarding avr c for jobs like a7105 rx/tx ill bet you cant even do a blink program. probably cant even get the tools up. and if you do manage it will be at least an order of magnitude bigger than an asm version. source AND bin.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 08, 2013, 08:00 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
Quote:
Originally Posted by dave1993 View Post
you maybe mean to say "not implemented all 16 hopping sequences, only the first one". or "only the first row". a sequence (row) contains 16 bytes (columns). there are 16 repeating sequences. so instead of:

andlw 0xF0 ;row=tableOffset <- (id0 & 0x0F)*1

your code should be:

andlw 0x0F ;row=tableOffset <- (id0 & 0x0F)*1
then shift left 4 ???

or:

shift rt 4 then
andlw 0xF0 ;row=tableOffset <- (id0 & 0x0F)*1

i dont see why the issue was confused with all that modulus baloney. we are just talking digits here because "mod 16" is same as "and 0xf".

btw how are you checking your algorithm?
i do:
swapf id0 then andlw 0xF0 = swap low/high nibble of id0 so bit0..3 became bit4..7 and vice-versa and then only keep bit4..7 = (id0 & 0x0F)*16
That works with the first 16 sequences.

I check with oscilloscope (gio pin) that receiver gets all tx packets (looks like a square wave, period =1.46ms or 685Hz) and it is just fine.

Dave when you say that you have tested home made RX with different TX, you mean you have tested the RX I have done ? (I remember you said that you ordered some pics and a pckit3 prog/debuger).
If the answer is yes then there may be two reasons to have troubles:
1 - I just implemented the first 16 hopping sequences so if tx id0 > 16, it does not bind.
2 - I have allready done and tested 3 RX (1x 6ch old version, and 2x 7ch version) and the last one was sometimes missing packets ! the trouble was that 1.5ms time-out (see pic code) between 2 successive packets is two close to 1.46ms ! I think cheap TX or/and pic internal oscillator is/are not so accurate. So I changed time-out to 2ms and now it works fine...
I could send you a rx if you are ready to do tests. Would be cheaper for me than buying hundreds of tx

btw I ended TX code and tested it connected to the module connector (ppm out) of an optic6 tx. To do so you need a resistor in series and a 3v zener diode in parallel to ch1 in order to limit ppm voltage input (I fried my 6ch prototype because I thought that with just a 10k resistor in series pic could't not latch-up but it does! so don't forget zener diode) So yesterday I played with quadcopter after midnight (I was happy but my wife was not so happy...) It was more pleasant than with original TX... I have to do range tests...

Let me clean pic code and I'll do updates soon
ThierryRC is offline Find More Posts by ThierryRC
Last edited by ThierryRC; Feb 08, 2013 at 08:05 AM.
Reply With Quote
Old Feb 08, 2013, 08:04 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,609 Posts
How much is your original PPM input voltage(before reducing it)?It was one thread here around saying if PPM voltage is more than 3.3V it will fry the module.
midelic is online now Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 08, 2013 at 08:44 AM.
Reply With Quote
Old Feb 08, 2013, 09:38 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
original PPM voltage ? well I must admit I even did not put the oscillo probe on it....
no more than optic6 battery < 12v
With resitor and zener no risk to fry a module
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Feb 08, 2013, 09:53 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,609 Posts
Just curious.Well I don't need to reduce it.On my core er9x Tx I have around 2.9 Volts so this is not a problem.
midelic is online now Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Feb 08, 2013, 11:23 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by ThierryRC View Post
i do:
swapf id0 then andlw 0xF0 = swap low/high nibble of id0 so bit0..3 became bit4..7 and vice-versa and then only keep bit4..7 = (id0 & 0x0F)*16
That works with the first 16 sequences.

...

I just implemented the first 16 hopping sequences so if tx id0 > 16, it does not bind.
i dont know why you say that because as discovered by pb/zeza the 16 sequences (256 bytes) repeat so x0 is same 16 byte sequence as x1 which is same as x3 etc. i verified this is true by testing with radios that have id from x0 to xf which all worked fine. the protocol errors i found related to column values not row selection. i thought your original code should work fine with all tx.

Quote:
Originally Posted by ThierryRC View Post
I check with oscilloscope (gio pin) that receiver gets all tx packets (looks like a square wave, period =1.46ms or 685Hz) and it is just fine.
i started by using a scope just that way but found that even though mine was a dso (tek tds220) in some cases it did not show the missing packets reliably. the trace looked ok but when i used an led it showed many missed channels. very consistant and always same channels so i suspected bad protocol rather than noise or timing. anyway i like using an led because they are smaller and cheaper than a scope and all my rx have one now. im trying to decide whether to turn on for good packets to show link or lost packets to show errors. unfortunately the eye does not detect short dark periods as well as short light periods.

Quote:
Originally Posted by ThierryRC View Post
Dave when you say that you have tested home made RX with different TX, you mean you have tested the RX I have done ? (I remember you said that you ordered some pics and a pckit3 prog/debuger).
i bought some 18f14k22 from digikey and also an ebay clone programmer but that has not arrived yet. another problem is the new mplab is a lot bigger than my old one and dont fit in my netbook atm.

Quote:
Originally Posted by ThierryRC View Post
I could send you a rx if you are ready to do tests. Would be cheaper for me than buying hundreds of tx
yes, i would like to check your rx against my radio collection. im convinced the ones i have are a good test because they cover nearly every combination of row and column id. i have access to many more v911s at the school and some friends that have turnigys but see no need for those yet.

i was going to ask you to sell me one and willing to reimbure you. i have just been hired to design and build a batch that have both 8ch servo and 4ch motor/actuator capability. i plan to make some extra for myself so can send you one of those. in any case ill pm my address and am very curious how it behaves with some of the "problem" ids.
dave1993 is offline Find More Posts by dave1993
Last edited by dave1993; Feb 08, 2013 at 12:08 PM. Reason: spellung error
Reply With Quote
Old Feb 08, 2013, 11:43 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by midelic View Post
How much is your original PPM input voltage(before reducing it)?It was one thread here around saying if PPM voltage is more than 3.3V it will fry the module.
im surprised to hear thierry cooked his pic with 10k resistor. i was certain there was not a ppm interface problem that cant be fixed with simple series and/or pullup resistor until hearing that. the avr guys have been discussing this for years and consensus is 200ohm resistor will protect modern mega and tiny devices from latchup or clamp diode damage even up to 12v. ive pretty much verified this myself shipping hundreds of chips with nothing more than 1k resistor in series for 12v rs232. no zener or other components needed.

i do know the old 90sxxxx avrs would latch and cook if you powered down and up again with 12v inputs even with 2k series resistor. so atmel fixed that long ago and im surprised to hear microchip hasnt. guess i should stop making fun of the guys who build those complicated level shifters and protection circuits.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 08, 2013, 12:50 PM
Registered User
United States, ID
Joined Sep 2011
420 Posts
Quote:
Originally Posted by dave1993 View Post
speaking of windbags jake you are the king. cant count the number of posts where you complain that this or that is no dam good and somebody should do something. then you proceed to do huge amounts of.... nothing.

i did get a kick out of your advice that homemade copper soldering tips are better than even the $1 ebay iron clad.
I posted my comment to help a guy YOU were calling a noob avoid the mistakes you've made. Maybe he'll end up not being a ornery windbag like you.

I'm surprised you still haven't realized you're wrong about the iron tips. Maybe it's easier for you to waste money on crappier iron tips, but not everybody is so lazy.

Copper conducts heat much better and tins better. FYI, that's the main job of a soldering iron tip. There's plenty of other advantages to them also. Being too lazy to use a better tip, too lazy to shape your tip with a couple swipes of a file, and too lazy to save money for your operation... just isn't a good excuse for many people.

In any case, sorry to everyone for taking this thread off topic.
jakestew is offline Find More Posts by jakestew
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 1006 Sep 13, 2014 07:12 PM
Discussion Benefits of buying FlySky TH9x (v2) over Turnigy 9x (v2) wwfisher Radios 55 Sep 08, 2014 12:13 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