I am trying to program an ATMega328P on a Pololu Baby Orangutan B-328 board with Pololu's AVR Programmer V2.1 on Atmel Studio 7.
I can turn the user LED on or off so I know the programming environment is OK. The problem is with including Timer/Counter1 to generate periodic interrupts. I'm using a closely related version of the program on a ATtiny104 Xplained Nano which works.
All the timer registers generate Build errors. Example: "out CLKPR, r16 - Operand 1 out of range: 0x61". So the assembler knows the offset for the register but still generates an error. Some other registers such as TCNT1H are not included in mdef328p.inc.
I've put in #include "mdef328p.inc" and made sure it is in the same directory as the main code main.asm and also in the directory that contains the project.
I'm concerned that this .inc file does not show under dependencies in the Solution Explorer. Why? Maybe it relates to the errors.