8
\$\begingroup\$

I have a few microcontrollers sitting in my "junk parts" bin. I think some of them arrived there when, after programming them, they exhibited strange behavior. I've since learned a lot, for example, how having the wrong optimization on the compiler can cause such strange behavior. On the other hand, some of the microcontrollers may have well been damaged due to static, out of tolerance voltages, etc. Thus, I believe some may be in good working order.

Before I throw everything out, I wondered: Is there a relatively straightforward or easy way to test a microcontroller to determine if it is still good?

The micros in particular are the Atmel ATTiny13, ATTiny26, and ATTiny2313, both DIP and SOIC versions.

\$\endgroup\$
  • 2
    \$\begingroup\$ Depending on your programmer, I think it should be able to talk to the chip before programming, to verify it's ID and such. Have you tried such a thing? \$\endgroup\$ – dext0rb Jan 15 '13 at 21:25
  • \$\begingroup\$ Using USBTiny and AVRDude, yes, it will indicate if it cannot establish a connection to the chip; in those cases I treat them as dead. Sometimes programming completes, but the chip behaves oddly. In those cases it looks like the proper way to diagnose is as @Passerby suggests. \$\endgroup\$ – JYelton Jan 15 '13 at 21:58
  • \$\begingroup\$ @JYelton Please see this post to get some useful information on hooking up Arduino to program micros. You can use avrdude command -e to erase the device and see if avrdude can talk to your device. Here is the man page for avrdude command reference. \$\endgroup\$ – Chetan Bhargava Jan 15 '13 at 22:24
  • \$\begingroup\$ You can use Arduino for High Voltage programming too, that may (or may not) solve other (communication) problems with AVR's. rickety.us/2010/03/arduino-avr-high-voltage-serial-programmer \$\endgroup\$ – jippie Jan 16 '13 at 12:21
10
\$\begingroup\$

If I was to fully test each MCU for its correct functionality, I would build a test board for each, with an adapter or socket to aid the easy change of the IC. Connect each IO pin to a visual output such as an LED, and program it with a simple firmware that will test each pin in turn. A further step would be to test the communication and other features depending on how thorough you want to be.

However if you simply want to quickly check the MCU is communicating properly with the programmer. I would use a programmer such as Pocket AVR Programmer, with a breakout board or adapter for each MCU. Then using the command line quickly test each MCU to see if it responds.

An example for the ATTiny2313 would be:

enter image description here http://www.ladyada.net/make/usbtinyisp/avrdude.html

\$\endgroup\$
  • \$\begingroup\$ An Arduino (if you have one handy or wish to keep one handy) can also be used to test them along with avrdude as @davivid mentioned. You can quickly wire them up on a breadboard. \$\endgroup\$ – Chetan Bhargava Jan 15 '13 at 22:03
4
\$\begingroup\$

Program them with a non-optimized, easy to debug/observe code. If it doesn't act the way it should, but does on a known good chip, then you can assume the chips are damaged.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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