Cannot upload sketches to RBBB using FTDI cable

Questions about the Really Bare Bones Board
Post Reply
NickGammon
Posts: 2
Joined: Thu Mar 03, 2011 7:49 pm

Cannot upload sketches to RBBB using FTDI cable

Post by NickGammon » Thu Mar 03, 2011 8:20 pm

I'm starting a new thread because I didn't want to necro one that was a few months old. Sorry if this isn't appropriate ...

In brief, I assembled a RBBB board, recently purchased. It seems to work fine in the sense that the power light comes on, and pin 13 blinks in this pattern:

On for 0.1s, off for 1.286s, repeat.

I am trying to program it, on a Mac using OS/X with this: "USB FTDI TTL-232 cable - TTL-232R 3.3V" (from Adafruit). According to their site:
These are perfect for use with a Boarduino, Meggy's, or other Arduino clones, and Fuzeboxen.
...
The version we have is the 3.3V. The data signals are at 3V and the power line provides 5V. We suggest this for any product that needs FTDI cables.� Because the cable is 5V compliant, you can use it with 3v or 5v logic just fine - no level shifting required!.
...
If you have a device that is running at 5V logic and requires 5V power, this cable will work fine.
Well, maybe.

I have done extensive tests to try to work out whether it is user error (me), lack of reset pulse, wrong choice of board, etc. So far I have this (measured on the pins of the Atmega itself, to eliminate the possibility of soldering problems):

RTS is being taken from high to low at the start of the upload. The board responds by taking the reset line from high to low for around 60 us.

About 0.25s after reset is asserted, the Rx pin (D0) receives at 115200 baud the following: 0x30 0x20.

There is no response on the Tx pin (D1).

However measuring the same attempt to upload on a Uno board, I also get 0x30 0x20, but the board responds with 0x14 0x10.

After a little while the Arduino uploader says:

Code: Select all

Binary sketch size: 1018 bytes (of a 32256 byte maximum)
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
Judging by the logic analyzer, 3 attempts are made to send 0x30 0x20.

According to measurements made with an oscilloscope the peak to peak voltage on the Rx pin is 3.84V.

Am I doing something wrong, or would you say the FTDI cable is not putting out enough voltage for the signal to be recognised?

Thanks for any assistance.

NickGammon
Posts: 2
Joined: Thu Mar 03, 2011 7:49 pm

Re: Cannot upload sketches to RBBB using FTDI cable

Post by NickGammon » Thu Mar 03, 2011 9:37 pm

A bit more information ...

I wired in a buffer chip (CD4050B) and measured the voltage on the Rx line (D0). It is now 5V peak to peak. However there is simply no response on Tx (D1).

So I suppose the question now is, is this a different bootloader to the one on the Uno?

Hmmm ... I seem to have worked it out. It's the "Lilypad Arduino w/ Atmega138".

And it works without the buffer chip after all. :-)

If I may humbly suggest ... the documentation doesn't specify which Arduino board type to select when uploading the test sketch, and it obviously makes a difference. Could it be amended to clarify that point? Thanks.

On the bright side, I've learnt a fair bit more about how the bootloader works. ;)

paul
Site Admin
Posts: 733
Joined: Mon May 12, 2008 4:19 pm

Re: Cannot upload sketches to RBBB using FTDI cable

Post by paul » Thu Mar 03, 2011 10:56 pm

NickGammon,

You're right that the board setting is the thing that was wrong. You don't want the Lilypad setting though, you want the second one in the list "Demilanove or Nano w Atmega328p"

We're thinking about putting Optiboot on all our chips now - so that everything will just work with the UNO choice. The problem comes in when people have six or ten other boards that have the old bootloader on them and they don't know which board to choose.

Think of all the fun you had though. ;) I'm very impressed at the thoroughness of your troubleshooting. One of the tough things about troubleshooting microcontrollers is that it's often hard to tell whether hardware or software is the relevant issue.

best,

Paul

Post Reply