Go Down

Topic: load sketch to stand alone atmega328p-pu chip (Read 2 times) previous topic - next topic

strykeroz

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
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

hiduino

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?


etayl


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

dc42

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/.
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.

etayl


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

strykeroz

Hi Stay

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

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

hiduino

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.


etayl


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

hiduino

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.


etayl


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

hiduino


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


See my reply #16 above...


Go Up