Go Down

Topic: Programming an UNO clone using a FTDI cable (Read 2852 times) previous topic - next topic

Dec 20, 2012, 08:13 pm Last Edit: Dec 20, 2012, 08:20 pm by danomahoney Reason: 1
Hi All,

Can anyone shine some light on this, I have an UNO Clone 328 chip with a bootloader installed, also installed is a 'blinky' sketch, working as expected (the chip was programmed in an UNO board).
The problem is if I try to reprogram the chip using a known working FTDI cable (5V version). All pins and hardware have been checked and rechecked ie Tx to Rx and Rx to Tx etc. I know the cable is good because it works with an Arduino mini pro 5V 16MHz board. Please see attached jpg of a typical programming of the mini, data is visible however if you look at the clone no data. All setting have been checked I've increased the cap to 200nF to increase the reset pules.

Any clues?

ATB Dan

Coding Badly

Hi,

Can anyone shine some light on this, I have an UNO Clone 328 chip with a bootloader installed, also installed is a 'blinky' sketch, working as expected (the chip was programmed in an UNO board).


Did you overwrite the bootloader when you installed the blinky sketch?

#2
Dec 21, 2012, 09:11 am Last Edit: Dec 21, 2012, 09:57 am by danomahoney Reason: 1
Hi Again Coding Badly,

I've just checked, removed the chip, put into an official UNO board and successfully reprogrammed, so the bootloader is OK, the cable is OK, unless there are different drivers or code running the cable during the programming of the different Arduino board version in the Arduino environment, do you know about these things?

I have also just checked the driver version, as I'm using an Intel based Win7 Pro PC I see the driver version is 2.8.26.0, the FTDI site indicates 2.08.24.

Just to prove if the problem, I'm going to try reprogramming the chip in an official board using the FTDI cable but this time monitor and capture the data line with logic probe.

Is there a clear description of the programming process describing the handshaking, pulse timing and the like somewhere, I've looked to on avail?

ATB Dan

Coding Badly


Try manually resetting.  Release the reset pushbutton just as Uploading... is displayed in the greenish bar between the edit window and the status window.

Hi Coding Badly,

I've tried the manual reset on an official UNO board, it works as you can see below.

Cheers for your help.

ATB Dan

Coding Badly


You are welcome.  If you need help with your auto-reset circuit, I suspect someone in General Electronics will lend a hand.

#6
Jan 13, 2013, 05:38 pm Last Edit: Jan 13, 2013, 05:43 pm by danomahoney Reason: 1
An up date, I've been looking at this problem off and on for a while and now see the cause of the problem, it's the version of bootloader. The UNO is programmed with the Optiboot 4.4, the FTDI cable and the 'Sparkfun' Breakout board do not work with this version. I'm now using the Duemilanove bootloader and it works fine.

retrolefty

Quote
The UNO is programmed with the Optiboot 4.4, the FTDI cable and the 'Sparkfun' Breakout board do not work with this version. I'm now using the Duemilanove bootloader and it works fine.


That is a rather puzzling statement and conclusion. How did you come to that? Is see no reason that one can't use any type of USB TTL serial converter chip or module or cable assuming you wire it up correctly and utilize the DTR or RTS signal if avalible as it is for the Sparkfun FTDI basic breakout board. The serial bootloader on most any arduino 8/168/328/1280/2560 based boards are agnostic as far as what is supplying the serial data to the AVR chip that the bootloader code interacts with.

Therefore I think your conclusion is incorrect or you are misunderstanding something.

http://www.sparkfun.com/datasheets/DevTools/Arduino/FTDI%20Basic-v21-5V.pdf

Lefty

Docedison

The Label is wrong on the power jumper.. <BG> It sez Default 3V3 and is shown 'jumpered' to 5 V.

Bob
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

westfw

Quote
The UNO is programmed with the Optiboot 4.4, the FTDI cable and the 'Sparkfun' Breakout board do not work with this version. I'm now using the Duemilanove bootloader and it works fine.

When attempting to program the clone with optiboot and the ftdi cable, did you select "Uno" as the board type?
The board type to use is strongly (exclusively perhaps) dependent on the bootloader, rather than the cabling details.  If you had selected, say, "Arduino Pro with m328" because it is also uploaded via FTDI, that would have been wrong.

oric_dan

One thing about the FTDI cable that nobody mentioned is it uses RTS instead of DTR.
The FTDI Friend [similar 6-pin female header I/F] uses DTR, however. Also, both of
these come in 5V and 3.3V versions.

For the cable, you need to go to "Control Panel > System > Hardware > device manager"
for the comport, and select "set RTS on close".


#11
Jan 14, 2013, 11:36 am Last Edit: Jan 14, 2013, 11:55 am by danomahoney Reason: 1
Hi Fokes,

I've checked all the usual TX/RX reversal, 5V or 3.3V, RTS, DTR, board type and auto reset hardware, havn't got to the root cause yet, but going back to an older bootloader does work.  I do think it is related to reset, and as some has suggested try a manual reset, however I found it very difficult to get the timing correct for it the work.

I have come to this conclusion because I an able to program an Arduino Mini Pro 5V with the FTDI lead and b'board, I checked the b'loader version on said Mini Pro using a sketch, reprogrammed the clone with the same b'loader and it works reliably.

So I'm convinced it's b'loader based, may be the root is due to some acknowledgement signal or timing etc. It seems that OPTIbootloaded and the FTDI Chip are not compatible, (handshaking etc, hardware is not a problem). The UNO uses a 8U2 device with a build-in USB controller. If someone is interested in using a clone UNO I would suggest buying a, https://www.sparkfun.com/products/10277, a 8U2 b'board, this should work without problems.

When I have time I will investigate further, may even buy the above.

ATB Dan, living and learning:-)

retrolefty


Hi Fokes,

I've checked all the usual TX/RX reversal, 5V or 3.3V, RTS, DTR, board type and auto reset hardware, havn't got to the root cause yet, but going back to an older bootloader does work.  I do think it is related to reset, and as some has suggested try a manual reset, however I found it very difficult to get the timing correct for it the work.

The easiest way to perform a manual reset that I was told about and tried is to press and hold down the reset button, then press upload, and when you see the first blink on the USB serial recieve LED release the reset button. That works pretty reliably for me.

I have come to this conclusion because I an able to program an Arduino Mini Pro 5V with the FTDI lead and b'board, I checked the b'loader version on said Mini Pro using a sketch, reprogrammed the clone with the same b'loader and it works reliably.

So I'm convinced it's b'loader based, may be the root is due to some acknowledgement signal or timing etc. It seems that OPTIbootloaded and the FTDI Chip are not compatible, (handshaking etc, hardware is not a problem). The UNO uses a 8U2 device with a build-in USB controller. If someone is interested in using a clone UNO I would suggest buying a, https://www.sparkfun.com/products/10277, a 8U2 b'board, this should work without problems.

Well I have installed the Uno optibootloader on all my 328 based boards, including older ones having a on-board FTDI chip and all works well as long as I remember to select Uno as the board type. Again the bootloader has no knowledge by what means the serial data is getting to pins 0 and 1, just that the programming data is coming at the correct baudrate from the IDE/AVRDUDE.

Lefty


When I have time I will investigate further, may even buy the above.

ATB Dan, living and learning:-)

westfw

It's vaguely possible, given the serial speeds involved, that SOME FTDI adapters might not work with SOME arduino clones using optiboot.   The 115200bps serial rate used by optiboot is not particularly accurate on a 16MHz AVR.  If (say) neither the AVR nor the FTDI had a crystal-controlled clock it's possible that you could get "unlucky" to the point where they could not reliably communicate.

oric_dan

Quote
It seems that OPTIbootloaded and the FTDI Chip are not compatible, (handshaking etc, hardware is not a problem).


99% of the time, I use either the FTDI cable or the FTDI Friend, both of which use FTDI chips,
and they work with both 16Mhz optiboot [UNO] and Duemilanove bootloader chips. So the issue
isn't one of compatibility.

Go Up