95
ATmega16M1/32M1/64M1 [DATASHEET]
8209E–AVR–11/2012
14.9.5
OCR0B – Output Compare Register B
The Output Compare Register B contains an 8-bit value that is continuously compared with the counter value
(TCNT0). A match can be used to generate an Output Compare interrupt, or to generate a waveform output on the
OC0B pin.
14.9.6
TIMSK0 – Timer/Counter Interrupt Mask Register
Bits 7:3 – Res: Reserved
These bits are reserved and will always read as zero.
Bit 2 – OCIE0B: Timer/Counter Output Compare Match B Interrupt Enable
When the OCIE0B bit is written to one, and the I-bit in the Status Register is set, the Timer/Counter Compare
Match B interrupt is enabled. The corresponding interrupt is executed if a Compare Match in Timer/Counter occurs,
Bit 1 – OCIE0A: Timer/Counter0 Output Compare Match A Interrupt Enable
When the OCIE0A bit is written to one, and the I-bit in the Status Register is set, the Timer/Counter0 Compare
Match A interrupt is enabled. The corresponding interrupt is executed if a Compare Match in Timer/Counter0
Bit 0 – TOIE0: Timer/Counter0 Overflow Interrupt Enable
When the TOIE0 bit is written to one, and the I-bit in the Status Register is set, the Timer/Counter0 Overflow inter-
rupt is enabled. The corresponding interrupt is executed if an overflow in Timer/Counter0 occurs, that is, when the
14.9.7
TIFR0 – Timer/Counter 0 Interrupt Flag Register
Bits 7:3 – Res: Reserved Bits
These bits are reserved and will always read as zero.
Bit 2 – OCF0B: Timer/Counter 0 Output Compare B Match Flag
The OCF0B bit is set when a Compare Match occurs between the Timer/Counter and the data in
“OCR0B – Outputdling vector. Alternatively, OCF0B is cleared by writing a logic one to the flag. When the I-bit in SREG, OCIE0B
(Timer/Counter Compare B Match Interrupt Enable), and OCF0B are set, the Timer/Counter Compare Match Inter-
rupt is executed.
Bit
76543210
OCR0B[7:0]
OCR0B
Read/write
R/W
Initial value
00000000
Bit
7654
3
2
1
0
––––
–
OCIE0B
OCIE0A
TOIE0
TIMSK0
Read/write
R
R/W
Initial value
0000
0
Bit
76543210
–––––
OCF0B
OCF0A
TOV0
TIFR0
Read/write
RRRRR
R/W
Initial value
00000000