Thread Tools
Feb 19, 2013, 04:04 PM
Registered User
midelic's Avatar
Recap.
I put 0x55 hex number to send,0xcc for 100us bit time delay and 39ms every byte delay.I sent the hex byte...but still not receiving 0x55.what you said to play with 0xcc delay counter?I don't get it.I played with speed numbers up from 9600 bps about 14400 and I received 92 F,.....at 9600 I received D5.
-------------------
Tell me something ...let's say it is working...and I will receive eventually that hex number.How this can help me with A7105?
Last edited by midelic; Feb 19, 2013 at 04:27 PM.
Sign up now
to remove ads between posts
Feb 19, 2013, 04:24 PM
RC beginner
Thread OP
maybe its too fast so try going slower. you are sending idle high not idle low or wrong start bit polarity, right? d5 is very close, only bit7 is wrong. looks like youre almost there. there arent too many other things that can go wrong at this point. maybe time for a scope trace.

edit: well maybe abandon this effort for now and see if you make progress debugging with led. or no feedback at all. maybe praying will help. lol!

ps these edit sessions can result in many questions going unanswered. better to put new thoughts in a new post?
Last edited by dave1993; Feb 19, 2013 at 04:50 PM.
Feb 19, 2013, 05:28 PM
Registered User
midelic's Avatar
I observed if I go a little higher 0xcd,....0xce,.....the number received is changing immediately.If I go lower even to 0xbe ...the result is the same D5.All the time the 7 bit is one...even if If the port starts low or high......is the same.

I did a test I changed the number to 0xaa the oposite and now I receive 15 .....bits is shifted.I changed the code maybe I have to clear the c flag.
If I start new thread.............I'll be bombarded with advices like this one......"Start learning C ,..........avr asm is not areal programming language". Here you are the host so I want to ....go up not down.
Last edited by midelic; Feb 19, 2013 at 06:40 PM.
Feb 19, 2013, 06:33 PM
RC beginner
Thread OP
if several numbers do not change the character it tells me baud rate is not the problem. instead something to do with bit count or polarity. are you using 9 for bitcount? 8 is too little. i still think a free soundcard scope would help. or even one of those cheapie ebay nano scopes. my buddy "won" one last week for $21. used but perfect shape with probe. if you plan to do any other projects like this you might investigate.

dont turn your nose up at c just because i do (actually i dont but like to get guys like jake and rj going). and arduino has many advantages for getting things going right away. mega8 is the original arduino chip. but you dont learn much that way. imo judging by the questions you ask here and in the other thread you are already way ahead of 99.9% of those guys. pitbull is almost there!
Feb 19, 2013, 06:43 PM
Registered User
midelic's Avatar
I use 8 for bit count .....I don't ever think of abandoning avr asm....I like too much now ,I'm hooked.I have big progress on understanding the code in 3-4 weeks now.About sound card ,I can use my laptop sound card and also visual analyzer or other program but I need to prepare it for this.....some soldering and 2 diode or a voltage divider to drop signal to 0.6-0.7v....so it takes some time.
Last edited by midelic; Feb 19, 2013 at 06:48 PM.
Feb 19, 2013, 06:50 PM
Registered User
http://www.zeitnitz.de/Christian/scope_en
Feb 19, 2013, 06:52 PM
Registered User
I only used old cable from head phones gave me enough to work ...2 mins
Feb 19, 2013, 06:56 PM
RC beginner
Thread OP
even though i use it every day its been a long time since i looked at my serial code and memory tells me 8 is not correct. iirc even the atmel app note on software uart had 9. you have to count the start bit. it sounds like you are either not sending one or its wrong polarity.

the reason i like 'U' is because it looks like 5 simple equal negative pulses on a scope. this is your goal. forget diodes for your soundcard. i think even resistors not needed. maybe just one series for safety but i didnt bother. we only need to see edges here not waveforms so clipping is ok. i predict this trick will be useful for debugging the a7105 routines too so more than just one time use.

i do know people who got this type thing working w/o a scope but it took a long time. a long long time.
Feb 19, 2013, 07:01 PM
Registered User
midelic's Avatar
I have that one the scope program ......so I can put around 3 Volts on my sound-card without problem.I feel like I'm very closed to fix this.
I put counter 9 and i received 15 instead of D5.First 2 bits problem.
on D5 first 2 bits are 11,with 15 they are 00,.....and i need to be 10.
If is a polarity problem how this can be changed?
I'll prepare for sound card scope.
Last edited by midelic; Feb 19, 2013 at 07:22 PM.
Feb 19, 2013, 07:24 PM
RC beginner
Thread OP
its 2 LAST bits in d5 that are 11. not 1st. actually as i mentioned before only the very last one is bad. you do realize for rs232 msb is sent last not first (lsl)?
Feb 19, 2013, 07:51 PM
Registered User
midelic's Avatar
Wait a minute.In my code I sent the MSB bit first using ROL command.I copied from Thierry code he was using the same....rotating bit command to the left...MSB first.So you say I have to send LSB first..using ROR command for rs232 serial adaptor?I didn't know that.
How about the bits sent to A7105.....LSB or MSB?

Ok I connected the sound card using old mic cables and jack, very fast,.........what am I looking for?I see from horizontal line the pulse is going down many pulses equally spaced.It looks like 4 negative pulses.I need 5 negative pulses.This one is with counter 9.
I tried to send LSB first but not receiving anything,..no signal at all, strange.I add one at the end of the byte and I received only zero.Nad the signal is only up down up down continuously ...without the delay.The serial I have is not standard rS232 and I'm not using UART interface.The serial device is serial to usb from Flysky 6ch tx.

The pics below is from when I sent MSB first,with counter 9.On this one at least you can see the delay between bytes.
Last edited by midelic; Feb 20, 2013 at 10:32 AM.
Feb 20, 2013, 10:34 AM
RC beginner
Thread OP
good job getting that scope up and running. like soldering iron very powerful tool for this hobby.

but rs232 is not at all like spi. god punished you for copying others instead of doing it yourself. google is your real friend here. spi bit order is opposite rs232. msb is sent last (lsr) not first (lsl). this is obvious from the scope trace. there should be 5 not 4 pulses. rs232 bit count is different too. 10 bits are sent (but stop bit can usually be ignored). like i said you need bitcount 9. looks like the start bit is missing or wrong polarity. or maybe last data bit is missing. also high time should be same as low time but that could be audio filtering.

to get a handle on this and see what yours should look like put your scope on the tx line from pc and hit 'U' in hyperterm. do this for other characters too, its very educational.
Feb 20, 2013, 10:43 AM
Registered User
midelic's Avatar
I don't think that the serial I have is RS232 compatible.I look on the internet I think is USB to TTL UART converter.I has the chip CP2102,,,it says USB to UART bridge in my computer.
I told you I tried to send data LSB with counter 9 but I received nothing,....... no signal at all.When I put stop bit only countinuous alternate signal on the scope.....and on the serial only zeros.the only time i received closer is when I send MSB first.
In fact when I changed ROL commmand with ROR command ...is not receiving any signal on the scope.
Last edited by midelic; Feb 20, 2013 at 11:06 AM.
Feb 20, 2013, 11:12 AM
RC beginner
Thread OP
Quote:
Originally Posted by midelic
I don't think that the serial I have is RS232 compatible.I look on the internet I think is USB to TTL UART converter.I has the chip CP2102,,,it says USB to UART bridge in my computer.
your dongle is fine. otherwise you would not see d5. and 2102 is better than 2303 type.

even though its standard terminology calling them "ttl level converters" is simply stupid and contributes to mass confusion. its bad enough the noobs do it but even so called professionals use the term which shows a basic lack of understanding. "level" has nothing to do with it. polarity is what matters. original old fashioned rs232 was idle low. modern serial is idle high. the 12v vs 5v (ttl) simply dont matter.

if you cant send from pc then make certain "none" is selected for handshaking in hyperterm setup.

Quote:
Originally Posted by midelic
I told you I tried to send data LSB with counter 9 but I received nothing,....... no signal at all.When I put stop bit only countinuous alternate signal on the scope.....and on the serial only zeros.the only time i received closer is when I send MSB first.
i thought you were almost there because d5 is only 1 bit off. however there appears to be a major bug in your code because bitcount is unrelated to the data sent. if what you say is true it means very few bytes work with your method. think about it.

these issues tell me you are really trying to get this working from scratch. this is admirable because most people would cut and paste. but you will be far more competent when the dust settles.
Feb 20, 2013, 11:18 AM
Registered User
midelic's Avatar
That D5 I got it when I sent the MSB first......the only time was working.I have 2 different codes for sending data bit by bit .I'll try the other code to see if is the same.When I tried with mSB both codes shows D5.When I said copied.....not copied really ...I translated .... ,,thierry code is PIC asm.
Edit: The second code is working on LSB(still not undertand why first one not working)....but stilll have 4 pulses instead on 5.still testing
Last edited by midelic; Feb 20, 2013 at 11:39 AM.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Mini-HowTo TH9X Turnigy FlySky IMax modify module to SMA and 1W booster DIY FPV rotaryboots Radios 5 Feb 03, 2015 05:46 AM
Sold iMAX/Turnigy/FlySky TX module & RX John Kim Aircraft - General - Radio Equipment (FS/W) 0 Jan 12, 2011 01:33 PM
For Sale iMAX/Turnigy/FlySky TX module & RX John Kim Aircraft - General - Radio Equipment (FS/W) 2 Dec 09, 2010 12:15 PM
For Sale Turnigy/iMAX/FlySky TX module & RX John Kim Aircraft - General - Radio Equipment (FS/W) 0 Oct 27, 2010 11:03 AM