FTDI cable upload problem

I burnt the bootloader to a 328P chip by following Nick’s tutorial at http://www.gammon.com.au/forum/?id=11637
I assume that I was successful, because if I placed the newly bootloaded chip into a Uno and uploaded a blink sketch it worked. I then purchased this FTDI cable from
http://www.ebay.com.au/itm/321058835137?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649#

The FTDI connections are
Red-5v
Black-GND
White-Rx
Green-TX
Yellow-RTX
Blue-CTS

So I connected
TX to Pin 2 (RxD)
Rx to Pin 3 (TxD )
RTX to reset via 0.1 uF cap
And power and ground with the chip on a breadboard wired up as per the circuit on Nick’s tutorial.
When I tried to upload a sketch (ASCII table or Blink) I get that all too familiar error
avrdude: stk500_getsync(): not in sync: resp=0x00.
I have the com port set to the one that Windows assigned it when I first connected the FTDI cable and the board set to Uno. Presumably Windows also assigned some generic drivers. There is no LED activity on the cable when attempting to upload the sketch. Can anyone please suggest anything that I might try. Thank you.

Swap the RX and TX?

nb. Put some 220/330ohm resistors in until you're 100% sure.

Yes I already tried that when it didn't initially work thanks Fungus, but still "no go". Thanks anyway 8)

When you say "There is no LED activity on the cable when attempting to upload the sketch" do you mean the cable has built-in LEDs?

If so, it's probably the Windows driver.

Yes the cable has built in Tx and Rx LED's. I might contact the Ebay vendor and see if he can point me to some drivers. Thanks for your help Fungus.

Pedro, its an FT232 based board? (can't open ebay from here).
Drivers are at ftdichip.com
Is it RTX, or RTS?
Try leaving that off an press & hold Reset on your board, release it when the IDE shows "Compiled xxx of 32xxx bytes"
That will at least prove out the Rx/Tx connections.

I had a similar problem with Windows 7 and an FTDI adapter board. Windows said it installed the drivers but it was lying. If the driver isn't signed you have to install it manually with the device manager->"have disk..." thingy.

Also, if the pin labelled "RTX" really is RTS [ie, 3rd party documentation is always such
a treat], then you have to go to the Control Panel and enable "System > Hardware >
Device Manager > Ports > USB Serial Port > Port Settings > Advanced > Set RTS On Close".

Also, with some of those devices, the signal levels are 3.3V and some are 5V, and I would
measure them rather than make any assumptions. Also, I always use series-Rs with those
sort of cables too.

Crossroads / Fungus , from the description on Ebay –

FTDI based USB to TTL Serial Cable are designed using the the standard FT232RL chipset
red-5v , black-GND , white-Rx , green-TX , yellow-RTX , blue-CTS
I did uninstal the drivers Windows selected and then installed and unsuccessfully tried some drivers that I downloaded from ftdichip.com , but when I checked driver details in device manager they were the same drivers. I have the 328 set up on a breadboard with the FTDI cable RTX wire going to 328 pin 1 via a 0.1 uF cap with a 10 K resistor to + 5v as per Nick Gammon's suggestion at http://www.gammon.com.au/forum/?id=11637
So do you suggest that I fit a reset switch with resistor and leave the yellow RTX line from the FTDI cable disconnected, and then “press & hold Reset on your board, release it when the IDE shows "Compiled xxx of 32xxx bytes" or am I misunderstanding ?
Oric dan thanks I will also have a look at that possibility after work. Yes Ebay items are cheap but when it comes to the information that some vendors supply, the saying “cheap and nasty” comes to mind 8)

"fit a reset switch with resistor and leave the yellow RTX line from the FTDI cable disconnected, and then “press & hold Reset on your board, release it when the IDE shows "Compiled xxx of 32xxx bytes" "

Yes, try that. Driver should assert RTS or DTR to create a reset. Don't know what RTX is.
Might take a couple of tries to find the right reset release time for the bootloader to start and catch the download message from the PC.

author=Pedro147 link=topic=152505.msg1145526#msg1145526 date=1362597356]
Crossroads / Fungus , from the description on Ebay –

FTDI based USB to TTL Serial Cable are designed using the the standard FT232RL chipset
red-5v , black-GND , white-Rx , green-TX , yellow-RTX , blue-CTS
I did uninstal the drivers Windows selected and then installed and unsuccessfully tried some drivers that I downloaded from ftdichip.com , but when I checked driver details in device manager they were the same drivers. I have the 328 set up on a breadboard with the FTDI cable RTX wire going to 328 pin 1 via a 0.1 uF cap with a 10 K resistor to + 5v as per Nick Gammon's suggestion at Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board
So do you suggest that I fit a reset switch with resistor and leave the yellow RTX line from the FTDI cable disconnected, and then “press & hold Reset on your board, release it when the IDE shows "Compiled xxx of 32xxx bytes" or am I misunderstanding ?
Oric dan thanks I will also have a look at that possibility after work. Yes Ebay items are cheap but when it comes to the information that some vendors supply, the saying “cheap and nasty” comes to mind 8)

The problem is that in the RS-232C standards that define the control signal names and their purpose, the name RTX is not a defined signal name, so it's not clear what it is, an input signal for the cable? An output signal from the cable?

If it's really the standard named RTS (Request To Send) signal then it can be used as the auto-reset trigger signal the arudino IDE uses to start the sketch upload process, by wiring to a series .1ufd cap wired to the reset pin. The arduino IDE/AVRDUDE use both the RTS and DTR signals for that purpose so either can be used to generate the reset pulse to the board.

Lefty

I just tried something that may help see what's what. I have both FTDI cable [uses RTS
reset] and FTDI Friend [uses DTR reset]. I put an Led [w/series-R, of course] on the pins on
the "cable" side of the 0.1 uF blocking cap, so can watch the reset signals directly from the
cable. Just looked at it, did not use a scope to watch for short pulses.

FTDI cable - RTS: held low, blinks high briefly a couple of times at the beginning of upload,
                  then high pulse again at the end of upload, then goes low.
FTDI Friend - DTR: held high, goes low during entire upload, then high again.

Thanks for your help and suggestions gents. I will have to spend a little time going through them all. I'll let you know how I go.

I tried all your suggestions, Firstly -

Crossroads – I Wired up reset switch and left RTX line disconnected, held then released switch just as / just after code compiled but to no avail.

Fungus – I uninstalled the drivers Windows assigned then manually installed drivers that I downloaded from ftdi.com but upon closer inspection found that they were exactly the same drivers.

Lefty - to be honest I really don’t know what I’ve got here.. maybe a pig in a poke :smiley:

Oric_dan - firstly I checked the voltage between the Gnd and power leads of the FTDI cable and it is 5.46 volts. I changed the port settings to set RTS on close but still no successful upload. I then connected a series resistor and LED to “cable side of the 0.1 uF blocking cap” as per attached circuit diagram. The LED doesn’t light while the code is compiling then as it starts to try and upload, it briefly flashes on / off then comes back on while the code tries to upload. It then goes out when the
avrdude: stk500_getsync(): not in sync: resp=0x00
error displays. From my rudimentary electronics understanding does this mean that seeing as the LED on the RTX line has it’s anode to + 5V that the RTX line is low when the LED is illuminated ? Does any of this information help to ascertain what is happening here or could someone just point me to an online store, with reasonable postage rates to Australia, where I can purchase a FTDI cable that works out of the box, so to speak. Thanks again to you all, for your help, Pedro.

FTDI_C~1.png

Where is your crystal? I don't see one in your schematic. It won't work unless you set your fuses for internal clocking. Otherwise you will need to add an external crystal(w/caps) or a resonator.

Pedro147:
Fungus – I uninstalled the drivers Windows assigned then manually installed drivers that I downloaded from ftdi.com but upon closer inspection found that they were exactly the same drivers.

When I had a similar problem it wasn't the drivers causing the problem, it was the way I installed them. I don't remember the 'correct' way but I know it wasn't the obvious way. I'm sure google can help.

hiduino:
Where is your crystal? I don't see one in your schematic. It won't work unless you set your fuses for internal clocking. Otherwise you will need to add an external crystal(w/caps) or a resonator.

That wouldn't explain the lack of flashing LEDs on the cable.

Hanging a LED/resistor off the auto-reset pulse signal is a very unproven concept that I've never seen applied before. The auto-reset circuit is a fragile enough thing to begin with without loading it down.

I would disconnect that led until you have a working auto-reset upload working and only then rehook up the led to see if it prevents uploading or not.

Lefty

Pedro147:
Oric_dan - firstly I checked the voltage between the Gnd and power leads of the FTDI cable and it is 5.46 volts. I changed the port settings to set RTS on close but still no successful upload. I then connected a series resistor and LED to “cable side of the 0.1 uF blocking cap” as per attached circuit diagram. The LED doesn’t light while the code is compiling then as it starts to try and upload, it briefly flashes on / off then comes back on while the code tries to upload. It then goes out when the
avrdude: stk500_getsync(): not in sync: resp=0x00
error displays. From my rudimentary electronics understanding does this mean that seeing as the LED on the RTX line has it’s anode to + 5V that the RTX line is low when the LED is illuminated ? Does any of this information help to ascertain what is happening here or could someone just point me to an online store, with reasonable postage rates to Australia, where I can purchase a FTDI cable that works out of the box, so to speak. Thanks again to you all, for your help, Pedro.

Sorry for the confusion - for the info I mentioned, I had the Led wired the other way around [and
I also used a MUCH larger series-R value], so it would work backwards to what you show in your
schematic.

lefty brings up a good point about loading down the RTS/DTR line in the cable, but it worked just
fine for me with uploading sketches. I don't run it that way normally, but just wanted to indicate
what the operation of RTS versus DTR looks like, to help identify how your cable might be working.
[lefty seems to be my online "conscience", LOL].

Buying 3rd party stuff from who knows who and who knows where is always a crap-shoot. Worse,
that so many of these ebay sites don't provide anything in the way of real documentation. What's
with that!

oric_dan

Yes I think that I will just put the purchase of this cable down to experience and buy one from a more reputable vendor. Am I correct in assuming that if you have a 328 with a bootloader burnt to it , appropriate to the board that you wish to use it in, that you only need a FTDI cable. Whereas if you don't want a bootloader on the chip (for space saving considerations) that you need an AVR programmer, or use the Arduino as a ISP.

Pedro147:
oric_dan

Yes I think that I will just put the purchase of this cable down to experience and buy one from a more reputable vendor. Am I correct in assuming that is you have a 328 with a bootloader burnt to it , appropriate to the board that you wish to use it in, that you only need a FTDI cable. Whereas if you don't want a bootloader on the chip (for space saving considerations) that you need an AVR programmer, or use the Arduino as a ISP.

That is correct, you need a bootloader installed onto the target chip first before serial communication can work for loading sketches, or a ISP programmer to burn a sketch without having a bootloader on the target chip. The IDE now allows either method to be used, normal upload button for serial/bootloader method or the File/upload using programmer menu option for using a ISP programmer.

Lefty