HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Feb 15, 2013, 08:51 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,898 Posts
Now is working.Good catch with checking avr dude scrolling messages.It was a defective program burner.I changed the burner for burn-o-mat and working now.The led stays high all the time but very dim light.Checked the voltage on pins ..around 3.02Volts.
I tested now also my blinking program is working beautifully.Maybe this was my problem, the burner program.
Thanks man!

Update:
The binding code .....still not working.I brushed every code line.
Inserted blinking routine in the code ...at the end of the binding code...LED is blinking...so the code is not stuck somewhere.I used the output pin for LED the SSpin,because SCk pin is unusable when SPI interface is enabled..The SPI interface is set properly....bits MSTR =1,CPOL=0(default),CPHA=0(default mode0),SPE=1,transmiting bit by bit in a loop,checked for SPIF flag.
I checked also with a multimeter every connection to A7105 pins to be sure everything is connected.
The A7105 is from a V911 tx module.
midelic is offline Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 17, 2013 at 09:45 AM.
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 17, 2013, 06:31 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
perhaps it's time to get an in circuit "programmer/debugger" interface in order to run your code instruction per instruction and check variables values, put breakpoints, stop running and see where you are in the code...
you can also do code simulation with IDE from atmel but when you interface with other devices like A7105 (because simulation only simulate your microcontroler not the A7105) nothing is better than an in circuit debugger.
I think it is called "avr dragon" for avr (correct me Dave if I am wrong)
(for pic it is "pickit3")
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Feb 17, 2013, 08:34 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,898 Posts
Thanks for the tip.
The avr dragon is a little expensive,around 50 euro.I'm still waiting for Dave to teach me how to diagnose all this with a LED blinking.
I red again the A7105 datasheet,....the calibration part.
I see for example, IF calibration, waiting for calibration end ...listening is at adress 0x22(not 0x02 as pb and you).It also says that max calibration time is 256 us(IF calibration),and for VCO bank calibration max.time for calibration end is 240us.
I'm asking......... is not better replace the code for listening at those addresses(for calibration end) ....with a simple delay code for 255us(easy also for debugging)?
midelic is offline Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 17, 2013 at 10:27 AM.
Reply With Quote
Old Feb 17, 2013, 01:47 PM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
some pics of RX/TX module with 18F14K22 and A7105:
RX module top(A7105 module is fixed with a double sided tape on pcb and then connected to pcb with straps)
TX module into a hitec module box (see red zener diode and 10k resistor to limit ppm voltage on connector, and 5v blue zener diode to limit supply voltage to 6.5v max)
RX module bottom
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Feb 17, 2013, 02:02 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,898 Posts
Wonderful!Neat setup.

Now it occurs something in my mind.The avr SPI interface uses 4 wire protocol.Maybe i have a connection problem.On my V911 tx module gio pins are not connected so A7105 is wired as for 3 wire data transfer.I'm asking in this case where I have to connect the MISO pin of my ATmega8 in order for this to work (SPI 3 wire transfer)?
midelic is offline Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 17, 2013 at 02:16 PM.
Reply With Quote
Old Feb 17, 2013, 03:41 PM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
2 solutions:
1-Try to solder a tiny wire on gio1 pin (and don't forget to modify A7105 config register to enable spi out on gio1 pin, see datasheet)
2-Don't use avr spi hardware and rewrite spi procedure, that's what I have done...
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Feb 17, 2013, 03:57 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,898 Posts
Yes I observed that you didn't use PIC spi protocol.I didn't pay much attention at the beginning as I was not familiar with PIC hardware and asm.
Good idea with rewriting the code without SPI interface.
Question:
why didn't you use PIC SPI interface?Is not working like that?

Based on you code I start writing a routine for sending a byte of data serially bit by bit through one I/O port....there are some interesting instructions for that in avr asm.I see it's working in avr studio simulator...... at least.
midelic is offline Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 17, 2013 at 09:12 PM.
Reply With Quote
Old Feb 18, 2013, 03:58 AM
Registered User
Joined Jul 2012
5 Posts
Quote:
Originally Posted by dave1993 View Post
hi archaeon, welcome to the monkey house rcgroups. this place is a ton of fun and lots to learn.



if it is not already compatible (a7105 is a hint it might be but not certain) then by far the easiest solution is to put a v911 board in it. they are cheap. building a custom rx will probably cost 10x more and take 2-3yrs if you are not experienced.



you need to attach a micro as midelic explains. some that have a bootloader (arduino, arm, stm) can be programmed with a cheap ebay serial dongle. raw avr and pic chips need to be programmed with a programming dongle. the avr ones are $2-$3 on ebay and the pic ones are $10-$20. google is your friend.
Dave, thank you so much for answer and I am sorry that I answer back so late.
archaeon is offline Find More Posts by archaeon
Reply With Quote
Old Feb 18, 2013, 05:28 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
Quote:
Originally Posted by midelic View Post
why didn't you use PIC SPI interface?Is not working like that?
I planned to use gio1 as A7105 spi out with pic spi interface, made pcb, and then realize I needed gio1 (or gio2) to test receiving packet ! I did't want to had a piggy wire between gio2 and pic and did't want to do pcb again so I just copy/paste spi procedures I had already written for previous development.
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Feb 18, 2013, 05:35 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
Dave, is it possible to do "in circuit debugging" with cheap serial dongle ?
if not, and if some really wants to do pic or avr or whatever microcontroller developments/coding, I would advice him to buy an "in circuit programmer/debugger".
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Feb 18, 2013, 07:19 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by ThierryRC View Post
Dave, is it possible to do "in circuit debugging" with cheap serial dongle ?
if not, and if some really wants to do pic or avr or whatever microcontroller developments/coding, I would advice him to buy an "in circuit programmer/debugger".
depend on what you meant by in circuit debugging. i do nearly all my debugging now via serial. hardly ever even fire up the scope anymore. i do have a dragon and although this particular chip dont have jtag or atmels debug wire or single wire interface, many do. even for those chips i still prefer what the "c girls" call printf debugging. in cases where the led is not enough i find it more useful to print hex values, strings, or even a simple ascii char.

i used to spend a lot of time with the avr studio simulator but have gotten away from that too. in my old age (not a teenager anymore. not since last year anyway. lol!) i tend to avoid proprietary and/or expensive tools specially for small projects like this. due to my frugal nature and scattered geography portabilty and simplicity are paramount.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 18, 2013, 12:40 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,898 Posts
Thierry,
Is it OK to replace the code "waiting for calibration end " with a delay subroutine for 256 us?


Quote:
Originally Posted by midelic View Post
I red again the A7105 datasheet,....the calibration part.
I see for example, IF calibration, waiting for calibration end ...listening is at adress 0x22(not 0x02 as pb and you).It also says that max calibration time is 256 us(IF calibration),and for VCO bank calibration max.time for calibration end is 240us.
I'm asking......... is not better replace the code for listening at those addresses(for calibration end) ....with a simple delay code for 255us(easy also for debugging)?
midelic is offline Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Feb 19, 2013, 04:37 PM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
Quote:
Originally Posted by midelic View Post
Thierry,
Is it OK to replace the code "waiting for calibration end " with a delay subroutine for 256 us?
I think a delay could do the job but it may be more than 256us.
post #72 (surfbreizh) shows a minimum of a dozen of "0x42 0x01" polling sequences but of course we don't know spi frequency of this RX.
i'll check with the scope..
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Feb 19, 2013, 04:43 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
i see 3 of those but idk what my slow poke spi routine takes. i do print out the values too which takes time even at 115200.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 21, 2013, 09:34 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
some pics of my futur mini octocopter board (30x30mm)
It will be a counter rotating propeller configuration (X frame).
In my opinion, it is an efficient and compact configuration
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Reply


Thread Tools

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