Page 23 of 346 Start Back Next End ZBasic System Library 11 ZBasic Microcontrollers for certain I/O routines. The specific timer that is used for a particular function varies depending on the underlying CPU type as shown in the table below. Timer Usage by Target Device Target Device RTC Timer I/O Timer Serial Timer PWM8 Timer PWM 16 Timer Input Capt. Output Capt. tiny24, tiny24A, tiny44, tiny44A, tiny84 Timer0 Timer1 Timer0 Timer0 Timer1 Timer1 Timer1 tiny48, tiny88 Timer0 Timer1 Timer0 - Timer1 Timer1 Timer1 tiny87, tiny167, tiny2313, tiny2313A, tiny4313 Timer0 Timer1 Timer0 Timer0 Timer1 Timer1 Timer1 mega8, mega8A Timer2 Timer1 Timer2 Timer2 Timer1 Timer1 Timer1 mega48, mega48A, mega48P, mega48PA, mega88, mega88A, mega88P, mega88PA, mega168, mega168A, mega168P, mega168PA, mega328, mega328P Timer0 Timer1 Timer2 Timer2 Timer1 Timer1 Timer1 mega16, mega16A, mega164A, mega164P, mega164PA, mega32, mega32A, mega324P, mega324PA, mega644, mega644A, mega644P, mega644PA, mega8535 Timer0 Timer1 Timer2 Timer2 Timer1 Timer1 Timer1 mega1284P Timer0 Timer3 Timer2 Timer2 Timer1 Timer3 Timer1 Timer3 Timer1 Timer3 mega8515 Timer0 Timer1 Timer0 Timer0 Timer1 Timer1 Timer1 mega161 Timer0 Timer1 Timer2 Timer2 - Timer1 Timer1 mega162 Timer0 Timer3 Timer2 Timer2 Timer1 Timer3 Timer1 Timer3 Timer1 Timer3 mega163 Timer2 Timer1 Timer2 Timer2 - Timer1 Timer1 mega323 Timer0 Timer1 Timer2 Timer2 - Timer1 Timer1 mega165, mega165A, mega165P, mega165PA, mega325, mega325P, mega645, mega645A, mega645P, mega169, mega169A, mega169P, mega169PA, mega329, mega329P, mega329PA, mega649, mega649A, mega649P Timer0 Timer1 Timer2 Timer2 Timer1 Timer1 Timer1 mega3250, mega3250P, mega6450, mega6450A, mega6450P, mega3290, mega3290P, mega6490, mega6490A, mega6490P Timer0 Timer1 Timer2 Timer2 Timer1 Timer1 Timer1 mega1281, mega2561 Timer2 Timer4 Timer0 Timer0 Timer1 Timer3 Timer1 Timer3 Timer1 Timer3 mega64, mega64A, mega128, mega128A Timer0 Timer1 Timer2 Timer2 Timer1 Timer3 Timer1 Timer3 Timer1 Timer3 mega640, mega1280, mega2560 Timer2 Timer4 Timer0 Timer0 Timer1 Timer3 Timer4 Timer5 Timer1 Timer3 Timer4 Timer5 Timer1 Timer3 Timer4 Timer5 mega8U2, mega16U2, mega32U2, AT90USB82, AT90USB162 Timer0 Timer1 Timer0 Timer0 Timer1 Timer1 Timer1 mega16U4, mega32U4 Timer0 Timer3 Timer4 Timer4 Timer1 Timer3 Timer1 Timer3 Timer1 Timer3 AT90CAN32, AT90CAN64, AT90CAN128, AT90USB646, AT90USB647, AT90USB1286, AT90USB1287 Timer2 Timer3 Timer0 Timer0 Timer1 Timer3 Timer1 Timer3 Timer1 Timer3 xmega16a4, xmega32a4 TimerC1 TimerE0 TimerD1 - TimerC0 TimerD0 TimerD1 TimerE0 TimerC0 TimerC0 TimerD0 TimerD0 TimerD1 TimerD1 TimerE0 TimerE0 xmega16d4, xmega32d4 TimerC1 TimerE0 TimerD0 - TimerC0 TimerD0 TimerC0 TimerC0 TimerD0 TimerD0