Pages: [1]   Go Down
Author Topic: Trouble shooting a bread-board Arduino  (Read 326 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So following the tutorial on this site I've built an 'Arduino' on a breadboard (ATMega328) with an FTDI breakout board to programme it.

The power LED lights and pressing reset causes the green LED (pin 13) to flash 3 times as expected (this means my chip has a boot loader?). However the ATMega doesn't seem to have the blink-pin 13 program installed. (I sourced the chip from Adafruit).

So my initial questions are: does my chip have a boot loader (I think the answer is 'yes'). Would I expect it to have the blink-led program installed? In which case: any suggestions about what I should check?

So assuming the blink-led program isn't installed I tried to upload my version of it. But I get "avrdude: stk500_recv(): programmer is not responding". I assume this is a problem with the board rather than the FTDI break-out? Any hints as to what the problem might be? (The red led on the breakout flickers briefly and then nothing, when I try uploading).

I've tried selecting a couple of the boards that use an ATMega328 but it makes no difference. Is there a particular one that should be used (surprised that wasn't included on the tutorial).

Help smiley
Logged

UK
Offline Offline
Faraday Member
**
Karma: 46
Posts: 3483
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you provide a wiring diagram for your breadboard Arduino?

What frequency is the breadboard Arduino running at?

I'm not sure whether you uploaded the bootloader yourself or whether you bought a chip with the bootloader already installed?

...R
Logged

Kentucky
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Might want to have a look here:

http://learn.adafruit.com/ftdi-friend

Not sure which FTDI breakout you're using so the avrdude commands may be different, but this may give you some help/insight.
Logged

NSW Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 2290
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So you do have the DTR line of your FTDI breakout port connected through the 0.1µF capacitor to the reset pin on your ATMega328 which has the 10k pull-up on it, don't you?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To answer everyone's questions smiley It's wired up as per this tutorial: http://arduino.cc/en/Main/Standalone
Logged

NSW Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 2290
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To answer everyone's questions smiley It's wired up as per this tutorial: http://arduino.cc/en/Main/Standalone

OK, so now do you realise that unless you have the 0.1µF capacitor to the reset pin from the FTDI breakout DTR line as I described, you have to briefly press (and release) the reset button the moment you see the download size message on the IDE status window in order to start the bootloader?
Logged

Andrews SC
Offline Offline
Full Member
***
Karma: 0
Posts: 211
If Arduino is not the answer, you are asking the wrong question!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

not only that, but the board type you use is dependent on which bootloader is installed. Some of my atmel 328's came with uno bootloaders, others with duemilanove. Many of the ftdi adpters have tx/rx reversed (have not used adafruit), so it's tx - tx and rx - rx. some use a .1uf on the rts, instead of the dtr. http://www.instructables.com/id/The-Embedded-Arduino-building-an-Arduino-into-a-p/
Logged

Steve Spence - ET/AT/R&D KK4HFJ

Offline Offline
Full Member
***
Karma: 4
Posts: 209
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Last week I went through what you are going through.  It was pointed out to me that the Preferences dialog in the Arduino GUI has a checkbox which gives lots of info while uploading a sketch.  Perhaps that will shed some light.

In my case, I highly suspect the COM port was not functioning properly.  I switched to a different port, then back, and all was well from that point.
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1409
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Divide & conquer,
Start with an FTDI loopback test.
Quote
...short the Tx and Rx lines, connect the USB end to a PC, and start a terminal emulator (such as PuTTY, if you're running Windows.) Be sure to turn off local echo, and any characters you type should appear in the terminal.

You may also want to:
http://forum.arduino.cc/index.php/topic,153159.0.html

Ray
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, so now do you realise that unless you have the 0.1µF capacitor to the reset pin from the FTDI breakout DTR line as I described, you have to briefly press (and release) the reset button the moment you see the download size message on the IDE status window in order to start the bootloader?

Hi Paul, yes I did know I had to press and release the reset button when uploading- I didn't realise I could enable auto-resetting in the way you describe, which would be much more convenient so I'll implement that: thank you.

not only that, but the board type you use is dependent on which bootloader is installed.

Hi Steve. Ah! I didn't realise it depended on the boot loader! According to the documentation for my chips they have the Uno boot loader installed: thank you. I'll try that.
« Last Edit: November 11, 2013, 02:06:47 am by edward » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Divide & conquer,
Start with an FTDI loopback test.
Quote
...short the Tx and Rx lines, connect the USB end to a PC, and start a terminal emulator (such as PuTTY, if you're running Windows.) Be sure to turn off local echo, and any characters you type should appear in the terminal.

You may also want to:
http://forum.arduino.cc/index.php/topic,153159.0.html

Ray

Interesting, thank you. Unfortunately the only domestic receiver I own is digital and my two transceivers are both FM (and buried somewhere in the garage).
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Solved: thank you all!

It turns out the tutorial I was following used TX-TX and RX-RX between the Mega and the FTDI, in fact the FTDI breakout I am using is properly setup for TX-RX and RX-TX. Fixing that and setting the board type to 'Uno' and everything works!

(And setting up auto-reset makes life easier).
« Last Edit: November 11, 2013, 03:39:39 am by edward » Logged

Pages: [1]   Go Up
Jump to: