attiny167-esxz ATMEL Corporation, attiny167-esxz Datasheet - Page 101

no-image

attiny167-esxz

Manufacturer Part Number
attiny167-esxz
Description
8-bit Avr 8-bit Microcontroller Microcontroller With 16k Bytes In-system Programmable Flash And Lin Controller
Manufacturer
ATMEL Corporation
Datasheet
10.11.7
10.11.8
7728A–AUTO–07/08
Timer/Counter0 Interrupt Flag Register – TIFR0
General Timer/Counter Control Register – GTCCR
• Bit 7:2 – Res: Reserved Bits
These bits are reserved in the ATtiny167 and will always read as zero.
• 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 (one), the
Timer/Counter0 Compare Match A interrupt is enabled. The corresponding interrupt is executed
if a compare match in Timer/Counter0 occurs, i.e., when the OCF0A bit is set in the
Timer/Counter0 Interrupt Flag Register – TIFR0.
• 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 (one), the
Timer/Counter0 Overflow interrupt is enabled. The corresponding interrupt is executed if an
overflow in Timer/Counter0 occurs, i.e., when the TOV0 bit is set in the Timer/Counter0 Interrupt
Flag Register – TIFR0.
• Bit 7:2 – Res: Reserved Bits
These bits are reserved in the ATtiny167 and will always read as zero.
• Bit 1 – OCF0A: Output Compare Flag 0 A
The OCF0A bit is set (one) when a compare match occurs between the Timer/Counter0 and the
data in OCR0A – Output Compare Register0. OCF0A is cleared by hardware when executing
the corresponding interrupt handling vector. Alternatively, OCF0A is cleared by writing a logic
one to the flag. When the I-bit in SREG, OCIE0 (Timer/Counter0 Compare match Interrupt
Enable), and OCF0A are set (one), the Timer/Counter0 Compare match Interrupt is executed.
• Bit 0 – TOV0: Timer/Counter0 Overflow Flag
The TOV0 bit is set (one) when an overflow occurs in Timer/Counter0. TOV0 is cleared by hard-
ware when executing the corresponding interrupt handling vector. Alternatively, TOV0 is cleared
by writing a logic one to the flag. When the SREG I-bit, TOIE0A (Timer/Counter0 Overflow Inter-
rupt Enable), and TOV0 are set (one), the Timer/Counter0 Overflow interrupt is executed. In
PWM mode, this bit is set when Timer/Counter0 changes counting direction at 0x00.
• Bit 1 – PSR0: Prescaler Reset Timer/Counter0
When this bit is one, the Timer/Counter0 prescaler will be reset. This bit is normally cleared
immediately by hardware. If the bit is written when Timer/Counter0 is operating in asynchronous
mode, the bit will remain one until the prescaler has been reset. The bit will not be cleared by
hardware if the TSM bit is set. Refer to the description of the
chronization Mode” on page 103
Bit
Read/Write
Initial Value
Bit
Read/Write
Initial Value
TSM
R/W
0
7
R
7
0
6
R
0
R
6
0
for a description of the Timer/Counter Synchronization mode.
R
5
0
R
5
0
R
4
0
R
4
0
R
3
0
R
3
0
”Bit 7 – TSM: Timer/Counter Syn-
R
2
0
R
2
0
OCF0A
R/W
PSR0
1
0
R/W
1
0
ATtiny167
TOV0
R/W
PSR1
R/W
0
0
0
0
GTCCR
TIFR0
101

Related parts for attiny167-esxz