Go Down

Topic: smd atmega328: flashing bootloader seems okay, programming yields sync-error (Read 1 time) previous topic - next topic

CaptainJack

I'm building a standalone atmega328 smd-version:



I checked connections and shorts, all seems to be well.

I flashed it with another arduino using ArduinoISP. While burning the bootloader the TX and RX leds on the programming arduino-board flash happily and my IDE ends with a remark like "bootloader has been burned". All seems well.

After that I proceeded to flash my new chip with a sparkfun ftdi breakout board. This board works well with other standalone atmega328 chips. When I try to upload a program only the TX led on the sparkfun board flickers, not the RX, and I get this error message:

Binary sketch size: 466 bytes (of a 30,720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00


I did try and swap TX and RX lines just to check if I mixed those up, to no avail.

I'm pretty much at a loss here: I do not now if my chip works. My questions would be along these lines:

* my IDE reports the bootloader has been burned. Is it possible the process went wrong but I still get this remark ?
* can I be confident that my crystal is working well ? can you burn a bootloader with a malfunctioning crystal ? Most sync-errors with other standalone boards were cause of wrong capacitors on the crystal.

Your feedback is appreciated !

Cheers,

Jack


o_lampe

You might have wrong baud-rate or issues with the ftdi-driver.
Have you tried the loopback-test with the serial monitor?
FTDI board only at first, than test it with the arduino.
It's not my fault when my Posts are full of Errors. This stupid autocorrection from my browser is set up for german grammar.

CaptainJack

Thank you for your reply.

Loop-back test with just the ftdi board works fine, the serial monitor in the IDE echoes everything. If the board is connected to the smd chip and I connect TX and RX the loop-back still works.

CaptainJack

Right.

Burned the bootloader with Arduino Duemilanove... everything works.

Burning with UNO says "job done" but didn't do the job.

Is it possible to burn a bootloader with the UNO ? Shame if it wouldn't be...

Protoneer

I just wondering. What is the main reason that we can't use Arduino UNO SMD to program other MCU's?

I know if you have the DIP version you need to take the MCU out...
Delta 3D Printer with Auto Bed Leveling - http://www.kickstarter.com/projects/ttstam/openbeam-kossel-pro-a-new-type-of-3d-printer/posts
http://blog.Protoneer.co.nz

CrossRoads

Try
File:Preferences , click the Verbose output check boxes, see what comes up.

If no errors, then see if you can upload a sketch via the ICSP connections (File:Upload Using Programmer).
If that works, then the error may be speed mismatch between what the PC is using and what the bootload code is using.

Which bootloader did you install?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CaptainJack

I'll have to wait a few days because the chip burned, so I'll have to replace it or make a new board.

To clarify: I tried to burn a bootloader TO the atmega328 smd chip, using a regular Arduino UNO board as ISP programmer.

I put the ArduinoISP sketch onto the UNO, connected the smd chip according to the ArduinoISP pages on the website (http://arduino.cc/en/Tutorial/ArduinoISP) and tried to burn the bootloader to the smd chip. There is one thing I did not really understand:

Wire your Arduino board to the target as shown in the diagram below. (Note for the Arduino Uno: you'll need to add a 10 uF capacitor between reset and ground.)

So I need to put the 10uF between reset and GND of the device that is using the ArduinoISP sketch, or on the target ?

As far as I know I tried to burn the standard bootloader; I use IDE version 1.0.3 I think, so the bootloader that comes with that.

Cheers,

Jack

Go Up