Go Down

Topic: can't download program via arduino with my PCB brd (Read 388 times) previous topic - next topic

yu shao

I have been working on this project for a while now. I designed a PCB board that will have atmega328 SMD chip and the USB to UART Bridge - FT232RL on one single board .
USB bridge chip link: http://www.sparkfun.com/commerce/product_info.php?products_id=650
atmega328 SMD chip : http://www.sparkfun.com/commerce/product_info.php?products_id=9261

I am in the final stage where I have designed the PCB, solder the microcontroller and USB bridge onto it. downlaod the bootloader, but when I try to download the program via arduino. it gives me the error

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I think the error means "can not communicate with microcontroller via usb bridge".

There is a picture of my schematics :

There is a picture of my PCB board:

If the images are too large and some got cut off, you can view it at this link: https://sites.google.com/site/seniordesignprogress/programming/pcb

This is the system I am running on, although I highly believe that is not the source of my problem.
windows xp,
arduino pro 8mHz/3.3v
I have other arduino boards that I can program just fine with the same computer.


The following were the steps I took:
0. I designed the PCB board based on arduino pro schematics and FT232RL breakout board schematics.
arduino pro schematics link: http://www.sparkfun.com/datasheets/DevTools/Arduino/Arduino-Pro_328-v13.pdf
USB bridge schematics link : http://www.sparkfun.com/datasheets/BreakoutBoards/FT232RL-Breakout-Schematic.pdf

1. After I received the PCB, I solder the atmega328 chip ,USB bridge and other necessary component like capacitors, resistors, onto the PCB.

2. I follow the schematics of arduino pro from Sparkfun and solder the 6 pins connection nessasary of the SPI communication in order to download the bootloader.

3. I power the board with the USB cable through the USB miniB hub on the PCB board, then connect the AVRSPI mkII to the 6 pins.

4. I open up arduino and choose the board "arduino pro 8mHz" then choose burn bootloader with AVRSPI mkII,

5. LED on AVRSPI mkII blinked orange color few times, and arduino IDE indicates "burn bootloader succesifully" ( I don't know if arduino actually verifies if the chip burns correctly. I suppose it does)  

6. then I unplug the USB cable of AVRSPI mkII, then connect my PCB board to computer with an USB cable.

7. here comes the problem I mentioned, I choose the right board and the right COM port, then click "UPLOAD."

8. LED on the USB bridge will blink 3 times, then a long silence, then blink one more time, then after a while, the error message show up on arduino IDE.

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I suppose the problem here is the arduino IDE is not able to communicate the atmega328 on PCB.
I spent a lot of time troubleshooting and double checking my schematics. I just not able to figure it out why.   :'( :'( :'(

I suspect the problem is most likely a hardware problem where I mess up in schematics. I could be wrong.

If anyone can look at my schematics (or my PCB board) to see if I makes any error that cause the communication to fail. I appreciate your help.

[timestamp=1271829780]

westfw

Which version of your schematic/PCB are you working with?  The first version looks like it is missing the auto-reset capacitor, and I'm not sure it would behave properly.

Your board is also running at 8Mhz?  Are you sure you have the proper rom monitor hex file for an 8MHz system?

I would suggest that you connect to the arduino serial port with some sort of terminal emulator, and see if it responds the way the arduino bootloader would be expected to.
(notably, send "1 " and see if you get "AVR ISP")  If it doesn't immediately work, try different serial speeds...

I don't see anything obviously wrong with the schematic.  Mine has the FTDI RESET line tied to Vcc, but IIRC that shouldn't be necessary, and the results you are getting would seem to indicate that you don't have an "FTDI stuck in reset" problem.


yu shao

Thanks for your response.

I am able to fix the problem. It turned out to be bad soldering job.

After looking under a microscope. I am able to fix some soldering legs and now it works.  ;D

Go Up