# Arduino Nano Sketch compile for Atmega32 Error

**URL:** <https://forum.arduino.cc/t/arduino-nano-sketch-compile-for-atmega32-error/1449704>\
**Category:** Programming\
**Created:** [June 25, 2026, 6:38am UTC](https://forum.arduino.cc/t/arduino-nano-sketch-compile-for-atmega32-error/1449704 "2026-06-25T06:38:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnsilver2](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsilver2/32/1220843_2.png) [@johnsilver2](https://forum.arduino.cc/u/johnsilver2)\
**Post date:** [June 25, 2026, 6:38am UTC](https://forum.arduino.cc/t/arduino-nano-sketch-compile-for-atmega32-error/1449704/1 "2026-06-25T06:38:27Z")

</div>

hi Guys  
i have working code on Arduino nano i want to move it to Atmega32 because of more pins needed  
when i compile it for mighty core Atmega32A it gives me errors

Arduino: 1.8.9 (Windows 10), Board: "ATmega32, Yes (UART0), EEPROM retained, Default, Standard pinout, BOD 2.7V, LTO enabled, External 16 MHz"

Build options changed, rebuilding all  
In file included from D:\Work\Projects\Recent\HiLife\HiLife44thEdition\HiLife44thEdition.ino:11:0:

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::setPwmDuty(char, unsigned int)':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:242:13: error: 'TIMER1\_A\_PIN' was not declared in this scope

if (pin == TIMER1\_A\_PIN) OCR1A = dutyCycle;

```arduino
         ^ ~~~~~~~~~~~

```

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:242:13: note: suggested alternative: 'TIMER1A'

if (pin == TIMER1\_A\_PIN) OCR1A = dutyCycle;

```arduino
         ^ ~~~~~~~~~~~

         TIMER1A

```

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::pwm(char, unsigned int)':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:251:13: error: 'TIMER1\_A\_PIN' was not declared in this scope

if (pin == TIMER1\_A\_PIN) { pinMode(TIMER1\_A\_PIN, OUTPUT); TCCR1A |= \_BV(COM1A1); }

```arduino
         ^ ~~~~~~~~~~~

```

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:251:13: note: suggested alternative: 'TIMER1A'

if (pin == TIMER1\_A\_PIN) { pinMode(TIMER1\_A\_PIN, OUTPUT); TCCR1A |= \_BV(COM1A1); }

```arduino
         ^ ~~~~~~~~~~~

         TIMER1A

```

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::disablePwm(char)':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:266:13: error: 'TIMER1\_A\_PIN' was not declared in this scope

if (pin == TIMER1\_A\_PIN) TCCR1A &= ~\_BV(COM1A1);

```arduino
         ^ ~~~~~~~~~~~

```

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:266:13: note: suggested alternative: 'TIMER1A'

if (pin == TIMER1\_A\_PIN) TCCR1A &= ~\_BV(COM1A1);

```arduino
         ^ ~~~~~~~~~~~

         TIMER1A

```

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::attachInterrupt(void (\*)())':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:281:2: error: 'TIMSK1' was not declared in this scope

TIMSK1 = \_BV(TOIE1);

^ ~~~~~

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:281:2: note: suggested alternative: 'TIMSK'

TIMSK1 = \_BV(TOIE1);

^ ~~~~~

TIMSK

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::detachInterrupt()':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:288:2: error: 'TIMSK1' was not declared in this scope

TIMSK1 = 0;

^ ~~~~~

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:288:2: note: suggested alternative: 'TIMSK'

TIMSK1 = 0;

^ ~~~~~

TIMSK

exit status 1  
Error compiling for board ATmega32.

This report would have more information with  
"Show verbose output during compilation"  
option enabled in File -\> Preferences.

---

<div class="post-metadata">

**Author:** ![johnsilver2](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsilver2/32/1220843_2.png) [@johnsilver2](https://forum.arduino.cc/u/johnsilver2)\
**Post date:** [June 25, 2026, 6:41am UTC](https://forum.arduino.cc/t/arduino-nano-sketch-compile-for-atmega32-error/1449704/2 "2026-06-25T06:41:52Z")

</div>

it looks like the Atmega32 not supported by Timerone library

any better solution ?

thanks

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [June 25, 2026, 6:41am UTC](https://forum.arduino.cc/t/arduino-nano-sketch-compile-for-atmega32-error/1449704/3 "2026-06-25T06:41:58Z")

</div>

As your topic does not relate directly to the installation or operation of the IDE it has been moved to the Programming category of the forum

When posting errors always use code tags

It looks like the Timer1 library is not compatible with the Atmega32 dues to port names being different on that chip

> [@johnsilver2](#):
>
> This report would have more information with

---

<div class="post-metadata">

**Author:** ![westfw](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/westfw/32/213443_2.png) [@westfw](https://forum.arduino.cc/u/westfw)\
**Post date:** [June 25, 2026, 9:08am UTC](https://forum.arduino.cc/t/arduino-nano-sketch-compile-for-atmega32-error/1449704/4 "2026-06-25T09:08:24Z")

</div>

The ATmega32 is an older processor than the ATmega328. (It's more of a "big ATmega8") As such, it has different names for a lot of the peripheral bits, including those for Timer1. (eg in the m8/m32 timeframe, the interupt masks for all the timers were lumped together in the TIMSK register, while in the m88/m168/m328 there is a separate interrupt mask register for each timer.)

> [@johnsilver2](#):
>
> it looks like the Atmega32 not supported by Timerone library

And that's the end result.

For a 40pin DIP chip that is more compatible with the m328p, you could look at the ATmega644 or ATmega1284.
