LedMatrix.cpp:57: error: 'TCCR1A' was not declared in this scopeLedMatrix.cpp:58: error: 'TCCR1B' was not declared in this scopeLedMatrix.cpp:62: error: 'WGM12' was not declared in this scopeLedMatrix.cpp:64: error: 'TIMSK1' was not declared in this scope

So, it appears to me that setting up a timer isn't the same in both systems. I don't mind using #ifdef blocks to differentiate the codebase, but I'm not sure what to put into the ATTiny's block.

Any help is appreciated, including pointers to relevant documentation or tutorials.

I think this one is better...http://code.google.com/p/arduino-tiny/http://arduino.cc/forum/index.php?topic=8878.0http://arduino.cc/forum/index.php?topic=51984.0

If you do decide to use the Tiny Core bear in mind that, by default, timer 1 is used for the time functions (millis, micros, etcetera) with the ATtiny85 processor. There is a compile time switch to use timer 0 instead.

Also, it appears this compiles fine with the ATTiny84, only the with 85 select it doesn't compile.

I remember timer 1 being identical on the ATmega328 and ATtiny84 processors. That is definitely the shortest path solution. Timer 1 on the ATtiny85 is very different than any of the other AVR timers you will encounter.

Quote

I'm also thinking that I may need to use the 84 anyway, as my project needs a minimum of 6 output pins, and I don't want to have to mess with disabling reset right now.

If you do decide to use the Tiny Core bear in mind that, by default, timer 1 is used for the time functions (millis, micros, etcetera) with the ATtiny85 processor. There is a compile time switch to use timer 0 instead.

Okay, thanks for the heads up. Do you remember where you saw that, so I can look up the details?

Also, it appears this compiles fine with the ATTiny84, only the with 85 select it doesn't compile.

I remember timer 1 being identical on the ATmega328 and ATtiny84 processors. That is definitely the shortest path solution. Timer 1 on the ATtiny85 is very different than any of the other AVR timers you will encounter.

Okay, can you point me to more information on that? Like I said, I originally just copy-and-pasted some code that worked, I'd like to understand it a bit more, and then I'd like to understand how to utilize the timer on ATTiny85. I have a lot of experience with reading and understanding technical docs, as long as I know what docs to look at :-)

Were you ever able to get interrupts to work with the ATTiny84? I'm running into the exact same problem- I can't get a simple CTC interrupt to trigger (for a clock-like application). The blink sketch works on the ATTiny84, but switching to interrupts with a similar sketch to yours compiles, but the ISR routine never fires.

I'm unsure if this is a problem with the Arudino IDE, or the damellis-attiny-6bff522 hardware files, but the datasheet seems to suggest the same registers as the AtMega328p, except with different register addresses.

I feel bad that I'll have to use a practically under used AT328p for this project when the AtTiny84 has the right amount of resources I need.

NON-WORKING CODE: (from http://letsmakerobots.com/node/28278, which works on Arduino, but not the ATTiny84 as mentioned above)[font=Verdana]/* Arduino 101: timer and interrupts 1: Timer1 compare match interrupt example more infos: http://www.letmakerobots.com/node/28278 created by RobotFreak */

Yes, I got my code to work, after trying a few things. I think the biggest difference is I set "TCCR1C = 0;" in my init. Also, (as your code has it), the interrupt vector name is TIM1_COMPA_vect, not TIMER1_COMPA_vect. Confusing, inconsistant, and unfortunate.

My actual project has #if's for the 84 specific stuff, so my source works for both ATTiny84 and ATMega328. The one thing I didn't realize is my code is running at 8MHz now, and my ISR takes up a large portion of the processing time now. I ordered some 20MHz crystals and some caps, so hopeful my code will run even faster than the Arduino version.