Pages: 1 [2]   Go Down
Author Topic: load sketch to stand alone atmega328p-pu chip  (Read 2252 times)
0 Members and 1 Guest are viewing this topic.
Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1123
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Etay

There are so many things that can cause that but the bottom line is your ATmega isn't responding.  Since you know that it is a good IC since you were able to load the bootloader that leaves the FTDI breakout as you suggest, or almost any aspect of the setup on that board.

Can you take a better photo of the actual board as it is when you're trying this, including the connections back to the FTDI, power etc?  Let's see what we can see...

Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 32
Posts: 641
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Since you used Nick Gammons bootloader programmer, it should have loaded the Optiboot bootloader onto your ATmega328P.  You probably should be selecting Uno board type with the IDE.  Which board type are you selecting from the IDE?

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Etay

There are so many things that can cause that but the bottom line is your ATmega isn't responding.  Since you know that it is a good IC since you were able to load the bootloader that leaves the FTDI breakout as you suggest, or almost any aspect of the setup on that board.

Can you take a better photo of the actual board as it is when you're trying this, including the connections back to the FTDI, power etc?  Let's see what we can see...

Geoff

Geoff,

attached three photos of my set up. i powered the chip with booster (you can see it on the top) as i mantioned i wired the common form the booster to the GND of the breadboard and the GND of the FTDI board.

thanks for the help,
Etay


* 2013-04-17 20.48.29.jpg (223.01 KB, 980x735 - viewed 25 times.)

* 2013-04-17 20.51.11.jpg (418.05 KB, 1306x980 - viewed 23 times.)

* 2013-04-17 20.51.27.jpg (451.44 KB, 1306x980 - viewed 29 times.)
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why are you even bothering with a bootloader for a standalone chip? It's easy enough to use your Arduino (I assume you have one) as an ICSP, include a 6-pin ICSP header in your standalone design and program the target chip using ICSP. You don't need the FTDI converter, and you can use atmeg328p-pu chips without the bootloader, which are cheaper than chips with the bootloader already installed. See http://miscsolutions.wordpress.com/2011/08/09/prototyping-small-embedded-projects-with-arduino/.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why are you even bothering with a bootloader for a standalone chip? It's easy enough to use your Arduino (I assume you have one) as an ICSP, include a 6-pin ICSP header in your standalone design and program the target chip using ICSP. You don't need the FTDI converter, and you can use atmeg328p-pu chips without the bootloader, which are cheaper than chips with the bootloader already installed. See http://miscsolutions.wordpress.com/2011/08/09/prototyping-small-embedded-projects-with-arduino/.

Hey,
I'm not familiar with ICSP programming... I will read the link you attached.
Thank you,
Etay
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1123
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Stay

Nothing stands out to me as wrong in those images so could well be your FTDI as you suspect.

Cheers, Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 32
Posts: 641
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A quick test of a loopback on your FTDI will narrow it down.  Just jumper the Tx to Rx on your FTDI board and then open Serial Monitor and see if it echos back the characters you type.

If it works then your FTDI is fine.

Another possibility is that there could be a mismatch of serial baud rate between the bootloader and what speed the IDE is selecting.  This depends on which board type you are selecting from the IDE.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A quick test of a loopback on your FTDI will narrow it down.  Just jumper the Tx to Rx on your FTDI board and then open Serial Monitor and see if it echos back the characters you type.

If it works then your FTDI is fine.

Another possibility is that there could be a mismatch of serial baud rate between the bootloader and what speed the IDE is selecting.  This depends on which board type you are selecting from the IDE.



Hey hiduino,
thanks for replying.

can you please say a more on how to check the FTDI board?  just connect the Tx to Rx and upload some skecth?

regarding your second comment, i thought of that also but the only parameter i can change is the baud rate of the FTDI. i think the default is 9600. how can i know what is the baud rate of the chip?

best wishes,
Etay
Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 32
Posts: 641
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When testing the FTDI board no sketch is involved, you are not talking to any Arduino.  You are creating a loopback so whatever goes out the Tx pin should be picked back up on the Rx pin.  Just use the Arduino IDE and select the Serial port and then open the Serial Monitor.  Type some characters and press the Send button.  If the same characters show back up in the window below the entry line then your FTDI board is working fine.

The baud rate of the chip will be whatever the bootloader is configured to run at.  For Optiboot it should be 115200 baud.  This is what the Uno board selection is using.  The IDE will adjust the baud rate of the FTDI based on which Board you select.  So if you selected the wrong board type, say Duemilanove then the IDE will try to use 57600 baud on the FTDI board, and will not match up to the chip bootloader running at 115200 baud.  So board selection is important and needs to match up to the bootloader type.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When testing the FTDI board no sketch is involved, you are not talking to any Arduino.  You are creating a loopback so whatever goes out the Tx pin should be picked back up on the Rx pin.  Just use the Arduino IDE and select the Serial port and then open the Serial Monitor.  Type some characters and press the Send button.  If the same characters show back up in the window below the entry line then your FTDI board is working fine.

The baud rate of the chip will be whatever the bootloader is configured to run at.  For Optiboot it should be 115200 baud.  This is what the Uno board selection is using.  The IDE will adjust the baud rate of the FTDI based on which Board you select.  So if you selected the wrong board type, say Duemilanove then the IDE will try to use 57600 baud on the FTDI board, and will not match up to the chip bootloader running at 115200 baud.  So board selection is important and needs to match up to the bootloader type.



O.k I got it, thanks.
If I used Nicks gammon bootloader do you know the baud rate ?
Etay
Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 32
Posts: 641
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I used Nicks gammon bootloader do you know the baud rate ?
Etay

See my reply #16 above...

Logged

Pages: 1 [2]   Go Up
Jump to: