TINY12 ATMEL [ATMEL Corporation], TINY12 Datasheet - Page 27

no-image

TINY12

Manufacturer Part Number
TINY12
Description
8-bit AVR Microcontroller with 1K Byte Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
TINY12-8SC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
TINY12L
Manufacturer:
ATMEL
Quantity:
5 510
Part Number:
TINY12L
Manufacturer:
NS
Quantity:
5 510
Timer/Counter Interrupt Flag
Register – TIFR
External Interrupt
Pin Change Interrupt
1006D–AVR–07/03
• Bit 7..2 - Res: Reserved Bits
These bits are reserved bits in the ATtiny11/12 and always read as zero.
• Bit 1 - TOIE0: Timer/Counter0 Overflow Interrupt Enable
When the TOIE0 bit is set (one) and the I-bit in the Status Register is set (one), the
Timer/Counter0 Overflow interrupt is enabled. The corresponding interrupt (at vector
$003) is executed if an overflow in Timer/Counter0 occurs, i.e., when the Overflow Flag
(Timer0) is set (one) in the Timer/Counter Interrupt Flag Register – TIFR.
• Bit 0 - Res: Reserved Bit
This bit is a reserved bit in the ATtiny11/12 and always reads as zero.
• Bits 7..2 - Res: Reserved Bits
These bits are reserved bits in the ATtiny11/12 and always read as zero.
• Bit 1 - TOV0: Timer/Counter0 Overflow Flag
The bit TOV0 is set (one) when an overflow occurs in Timer/Counter0. TOV0 is cleared
by hardware when executing the corresponding interrupt handling vector. Alternatively,
TOV0 is cleared by writing a logical one to the flag. When the SREG I-bit, TOIE0
(Tim er /Counter0 Overf low Interrupt Enabl e), and TO V0 are set (one), the
Timer/Counter0 Overflow interrupt is executed.
• Bit 0 - Res: Reserved bit
This bit is a reserved bit in the ATtiny11/12 and always reads as zero.
The external interrupt is triggered by the INT0 pin. Observe that, if enabled, the interrupt
will trigger even if the INT0 pin is configured as an output. This feature provides a way of
generating a software interrupt. The external interrupt can be triggered by a falling or ris-
ing edge, a pin change, or a low level. This is set up as indicated in the specification for
the MCU Control Register – MCUCR. When the external interrupt is enabled and is con-
figured as level triggered, the interrupt will trigger as long as the pin is held low.
The external interrupt is set up as described in the specification for the MCU Control
Register – MCUCR.
The pin change interrupt is triggered by any change on any input or I/O pin. Change on
pins PB2..0 will always cause an interrupt. Change on pins PB5..3 will cause an inter-
rupt if the pin is configured as input or I/O, as described in the section “Pin Descriptions”
on page 5. Observe that, if enabled, the interrupt will trigger even if the changing pin is
configured as an output. This feature provides a way of generating a software interrupt.
Also observe that the pin change interrupt will trigger even if the pin activity triggers
$39
Read/Write
Initial Value
Bit
$38
Read/Write
Initial Value
R
7
0
R
0
-
-
R
R
6
0
0
-
-
R
0
-
R
5
0
-
R
0
-
R
4
0
-
R
0
-
R
3
0
-
R
0
R
2
0
-
-
ATtiny11/12
TOIE0
TOV0
R/W
R/W
1
0
0
R
0
R
-
0
0
-
TIMSK
TIFR
27

Related parts for TINY12