ATmega328 Timer-Counter1 Compare Match B
ATmega328 Timer-Counter1 Compare Match B
ATmega48/88/168/328 etc.
TCNT1
Timer/Counter0 and Timer/Counter1 Timer/Counter1 Register
Prescaler
TCNT1H
System Clock
clkI/O
Prescaler 15 14 13 12 11 10 9 8
clkT1
TCNT1L
External Clock TIFR1
T0
7 6 5 4 3 2 1 0 Timer/Counter1 Interrupt Flag Register
OCR1B
Output Compare Register 1 B TIMSK1
Timer/Counter1 Interrupt Mask Register
OCR1BH
Timer/Counter1
OCIE1
15 14 13 12 11 10 9 8 ICIE1
B
OCIE1A TOIE1 Compare Match B
Interrupt
OCR1BL
(TIMER1 COMPB)
7 6 5 4 3 2 1 0
SREG
Status Register
I T H S V N Z C
TSM PSRASY PSRSYNC COM1A1 COM1A0 COM1B1 COM1B0 WGM11 WGM10 7 6 5 4 OC2A OC1B OC1A 0
TCCR1B
Timer/Counter1 Control Register B Compare Output Mode Waveform Generation Mode
ICNC1 ICES2 WGM13 WGM12 CS12 CS11 CS10 COM1B1 COM1B0 non-PWM Mode Mode WGM13 WGM12 WGM11 WGM10
Timer / Counter
TOP
Update of TOV1 Flag
(WGM modes 0, 4, and 12) Mode of Operation OCR1B at Set on
0 0 Normal Port Operation, OC1B disconnected This work is licensed under the Creative Commons Attribution-ShareAlike License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
Modes 9 or 11: Toggle OC1B on Compare Match
0 1
All other modes: Normal Port Operation, OC1B disconnected
Clear OC1B on Compare Match when up-counting.
1 0
Set OC1B on Compare Match when down-counting.
ATmega328 Timer-Counter1 Compare Match B
22 February 2010
Set OC1B on Compare Match when up-counting.
1 1 Copyright © 2009-2010 Donald Weiman
Clear OC1B on Compare Match when down-counting.