NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » TCCR0 undefined error
April 17, 2011 by oldphart |
I am trying to set up an interrupt using TIMER0 with the ATmega168 chip from Nerdkits. I have included <avr/io.h> and <avr/interrupt.h> but the preprocessor is throwing an undefined error for TCCR0 and TIMSK declarations, but it is ok with the TCNT0 declaration. Searched the include directory for TCCR0 and found it in numerous header files specific to various microcontroller chips with a caveat that the header must not be include directly, only through "io.h". I have no clue what the problem might be. Anybody know what I am missing here? TIA. -Dave
// prescaler = FCPU/1024
|
---|---|
April 17, 2011 by oldphart |
Sorry, Nevermind. Was using sample code from a different MC chip. I need to read the data sheet <sigh>. I need something like TCCR0A for the ATmega169 chip. Sorry for barking in the wrong woodlot! -Dave |
Please log in to post a reply.
Did you know that you can control 120 LEDs with just 17 microcontroller pins? Learn more...
|