Go Down

Topic: Optiboot with FTDI Problems.. (Read 8733 times) previous topic - next topic

WiredUp

Just need a little help here. I recently bought an Arduino UNO board, and had a couple of blank 328 chips.. so after digging through the forums I found out how to get the UNO to work as an ISP, and have successfully used it to write the boot loader to the blanks.

Problem is in the past I had used an FTDI cable to program standalone atmegas that had the old boot loader, and it worked wonderfully.. it saved me tons of time from having to swap chips, blah blah blah..

So now if I try to use my FTDI cable on a 328 with the optiboot boot loader.. I get errors in the IDE where it cannot communicate with the chip.. I know people are doing it with the new boot loader, and I am just missing something small.. can I get a few pointers?.. I read a couple of posts on here about the issue, but it hasn't gotten me very far at the moment.

Thanks!

Coding Badly

Quote
and have successfully used it to write the boot loader to the blanks


Using the Arduino IDE or avrdude from the command-line?

retrolefty

Quote
So now if I try to use my FTDI cable on a 328 with the optiboot boot loader.. I get errors in the IDE where it cannot communicate with the chip.. I know people are doing it with the new boot loader, and I am just missing something small.. can I get a few pointers?.. I read a couple of posts on here about the issue, but it hasn't gotten me very far at the moment.


What board type are you selecting to upload to the standalone chip? You have to use the Uno board selection as that is only one that has the correct baudrate that the uno bootloader uses.

Lefty

WiredUp

Arduino IDE.. I don't have a lot of experience with avrdude.. should probably move that way, but the arduino IDE has kept it simple, so I would like to stay with it if I can for the moment.

Yes, I do have the UNO selected when I try to upload the sketch with the FTDI cable. No luck :(

retrolefty


Arduino IDE.. I don't have a lot of experience with avrdude.. should probably move that way, but the arduino IDE has kept it simple, so I would like to stay with it if I can for the moment.

Yes, I do have the UNO selected when I try to upload the sketch with the FTDI cable. No luck :(


Well next step would be to perform the loop back test on the FTDI cable (jumpering rec and xmit pins) and see if the cable is still functional.

Lefty

WiredUp

#5
Oct 01, 2011, 11:48 pm Last Edit: Oct 01, 2011, 11:50 pm by WiredUp Reason: 1
avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

This is what I receive as an error in the IDE..

Cable tests out fine.. it came off another known working piece of equipment. It's just a USB to TTL serial cable.. I don't see why it shouldn't work.

Coding Badly


How do you have the auto-reset circuit wired?

WiredUp

10uF capacitor connected from reset to ground.

retrolefty


10uF capacitor connected from reset to ground.


Huh, that's the method used to defeat auto-reset, not to allow it to function for uploading?

Lefty

WiredUp

Yea, your right.. ok, so I was a little confused/feeling dumb there.. umm, well then I dunno is the answer to the previous question. Been trying to use the cable to interface with a boarduino unit.. its basically a chip, clock and power circuit with a header for a inline 6 pin connector for the cable.. lemme to some research on the auto-reset and get back with an answer or fix for that matter.

WiredUp

So I'm confused.. do you mean how the reset signal comes from the cable to the actual chip?.. In the past all I had to do was wire RESET to the DTR pin on the cable, then GND to CTS/GND pins, VCC to VCC, and then just RX to RX and TX to TX.. its was pretty straight forward.. the reset signal was sent directly from the cable.. never needed any other circuitry other than the basic omron type switch for manual reset.

WiredUp

Ok, so I decided to look up the schematic on the boarduino and found they were using a 0.1uF capacitor in series with the DTR/RTS line to the reset pin.

WiredUp

Ok, so I built a barebone circuit on the breadboard.. one of my boot loaded chips.. power is coming from the UNO board.. built the clock circuit, manual reset circuit and the FTDI cable pinout circuit.. connected the 0.1uF cap in series with the RTS/DTS line from the cable to the reset pin.. I have a LED on pin 19, and when I try to upload I can see it blink momentarily.. I know its trying I just can't figure out why it won't upload properly.. I have tried switching RX/TX pins just as a sanity check.. but nothing works.. :(

tim7


WiredUp

20 MHz. Resonator.. is that a problem?

Go Up