Loading...
Pages: [1] 2 3   Go Down
Author Topic: FTDI cable upload problem  (Read 959 times)
0 Members and 1 Guest are viewing this topic.
Canberra Australia
Offline Offline
Sr. Member
****
Karma: 5
Posts: 280
Enthusiastic Newbie
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

 
Logged

Valencia, Spain
Offline Offline
Edison Member
*
Karma: 65
Posts: 2281
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Swap the RX and TX?

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

Canberra Australia
Offline Offline
Sr. Member
****
Karma: 5
Posts: 280
Enthusiastic Newbie
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes I already tried that when it didn't initially work thanks Fungus, but still "no go". Thanks anyway  smiley-cool
Logged

Valencia, Spain
Offline Offline
Edison Member
*
Karma: 65
Posts: 2281
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Canberra Australia
Offline Offline
Sr. Member
****
Karma: 5
Posts: 280
Enthusiastic Newbie
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 249
Posts: 16572
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Valencia, Spain
Offline Offline
Edison Member
*
Karma: 65
Posts: 2281
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

the land of sun+snow
Offline Offline
Edison Member
*
Karma: 81
Posts: 2137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Kitchen-Sink Arduino-compatible boards

Canberra Australia
Offline Offline
Sr. Member
****
Karma: 5
Posts: 280
Enthusiastic Newbie
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-cool

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 249
Posts: 16572
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 279
Posts: 15328
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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  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  smiley-cool


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
« Last Edit: March 06, 2013, 02:32:53 pm by CrossRoads » Logged

the land of sun+snow
Offline Offline
Edison Member
*
Karma: 81
Posts: 2137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Kitchen-Sink Arduino-compatible boards

Canberra Australia
Offline Offline
Sr. Member
****
Karma: 5
Posts: 280
Enthusiastic Newbie
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Canberra Australia
Offline Offline
Sr. Member
****
Karma: 5
Posts: 280
Enthusiastic Newbie
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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-grin

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

Wahiawa, Hawaii
Offline Offline
Sr. Member
****
Karma: 11
Posts: 369
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Pages: [1] 2 3   Go Up
Print
 
Jump to: