NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » LED Array & Atmega328p

June 17, 2010
by n3ueaEMTP
n3ueaEMTP's Avatar

Another quick Question: Does anybody have experience with the LED array & a 328? I was able to get the LED array working fine on a 168 but when I switched to a 328, all I get is a blank array.

Things I done to correct the problem:

  1. used a 328 with the bootloader added by the NK staff.

  2. used a 328 without a bootloader (programmed with ISP).

  3. added the 328.h include file using both of the above programming methods.

  4. tried another 328 with all the above steps.

  5. beefed up the power supply (just in case).

  6. rewired the entire thing, twice.

I built the LED array when it first was listed in the tutorial page and now I've built another to give to a friend. The first one was working great. I stole the 168 for another project and now all I have left are 328s. I've been testing the MCU on the old array that I know works (when the 168 is installed).

Any help would be greatly appreciated.

Chris B. n3ueaEMTP

June 17, 2010
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi Chris,

This probably has to do with the change in convention for interrupt handler names. While compiling for the ATmega328P, you probably got a warning about vector names, saying something like:

warning: ‘SIG_OVERFLOW0’ appears to be a misspelled signal handler

Unfortunately this is only considered a "warning", when it's really a quite fatal issue. In any case, try replacing this line:

SIGNAL(SIG_OVERFLOW0) {

with this new notation:

ISR(TIMER0_OVF_vect) {

Then, re-run "make". Here's another recent example of this interrupt naming issue.

Let me know if that works -- and if not, keep your eyes open for any compiler warnings!

Mike

June 17, 2010
by n3ueaEMTP
n3ueaEMTP's Avatar

Mike, thanks for the quick response. I did exactly what you suggested & it worked like a charm. While I'm sure its there, I would have NEVER found that in the datasheet.

Thanks a bunch Chris n3ueaEMTP

Post a Reply

Please log in to post a reply.

Did you know that there are Power MOSFETs for switching big loads on and off? Learn more...