I recently purchased a number of ATmega328 chips loaded with the Optiboot (Arduino Uno) for some projects I am working on, but I have noticed something strange with them. I already have plenty of Arduino boards in my collection, but this time I wanted to make a very barebone Arduino-based project with a small component count.

Think something like Arduino Sleep Watchdog Battery.

With all the chips I also ordered ZTT 16 MHz resonators.

But if I power the ATmega328 and connect an LED to D13, the ATmega328 will power up and flash the LED, but at an ever increasing rate, and then it stops flashing after about three seconds.

Thinking that it might have been my wiring, I tried using the ATmega328 chips in my other Arduino boards and noticed that same thing. Thinking that it might just be a a bad chip, I have tested three chips in different boards, all with the same issue. Just in case I had a bad component blowing the chips, none of the ATmega328 chips have touched a component that another faulty chip has.

If I try to upload a sketch I receive a "not in sync" error, and it fails to upload.

All chips look to have come from SparkFun/LBE. One of the chip suppliers told me that there is a bad batch from SparkFun, but I can not find anything to back that up.

Thinking that the bootloader might be corrupted I set up another Arduino as an ISP programmer, but it kept giving me errors and returning the chip signature as an ATmega168 (peeling back the label I have confirmed the chip really is a ATmega328P-PU), but as this was my first attempt at using an ISP programmer I put this issue down to user error (me) and ordered a ready-made ISP programmer (yet to receive).

How can I fix this problem?

  • Did you try any of them with a crystal? From what I've seen, resonators may not be precise enough for serial communication in some cases. Still it wouldn't explain the main problem. Also did any of them work with internal oscillator? – AndrejaKo Dec 20 '11 at 7:21
  • I tried with crystals and resonators and they both had the same issue, without a crystal the chips do not seem to run the loaded sketch and I assumed that is because the flags needed to be set when burning the bootloader, I did follow this tutorial and could not load the boot loader using the internal oscillator arduino.cc/en/Tutorial/ArduinoToBreadboard – GR0B Dec 21 '11 at 1:08
  • I did test one chip in a ATmega168 board with a 16mhz crystal and it displayed the same issue. I also tested one of the other chips in a boards which had a 8mhz/12mhz crystal and it also had the same issue. So I do not think the issue is crystal/oscillator related. – GR0B Dec 21 '11 at 1:14
  • The sparkfun "slugs" should be history now; the chips weren't atmegas at all but some power supply component and were sold glued to a joke certificate after the problem was discovered, also they were surface mount not DIP. When you read an atmega168 signature, were you using a '168 based arduino as an ISP? Likely you were talking to its bootloader not the ISP sketch. Of course 168's fraudelently labeled as 328P's is possible, but I'd be disinclined to suspect it until you have a known 328P isp'd and working in the same socket where the unknown failed. – Chris Stratton Dec 21 '11 at 19:08

The issue was the loaded firmware. After re-burning the firmware onto all the chips, everything appears to work.

Funny that all the chips I ordered had the same corrupt bootloader.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.