attiny15l ATMEL Corporation, attiny15l Datasheet - Page 22

no-image

attiny15l

Manufacturer Part Number
attiny15l
Description
Attiny15l 8-bit Microcontroller With 1k Byte Flash
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATTINY15L
Manufacturer:
ATMEL
Quantity:
5 510
Part Number:
ATTINY15L
Manufacturer:
SIEMENS
Quantity:
5 510
Part Number:
attiny15l-1PC
Quantity:
1 670
Part Number:
attiny15l-1PI
Manufacturer:
AIMEL
Quantity:
5 510
Part Number:
attiny15l-1PI
Manufacturer:
VISHAY
Quantity:
5 510
Part Number:
attiny15l-1PI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny15l-1SC
Manufacturer:
ATMEL
Quantity:
3 447
Part Number:
attiny15l-1SC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny15l-1SI
Manufacturer:
ATMEL
Quantity:
8
Part Number:
attiny15l-1SI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny15l-1SU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
External Interrupt
Pin Change Interrupt
The MCU Control Register –
MCUCR
22
ATtiny15L
• 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 “1” to the flag. When the SREG I-bit, TOIE0
(Tim er/Co un ter0 Ove rflow Inte rrup t En able) an d TO V0 a re set (o ne) , th e
Timer/Counter0 Overflow interrupt is executed.
• Bit 0 – Res: Reserved Bit
This bit is a reserved bit in the ATtiny15L 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
rising 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
configured 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 in logical value on any input or I/O
pin. Change on pins PB4..0 will always cause an interrupt. Change on pin PB5 will
cause an interrupt if the pin is configured as input or I/O, as described in the section “Pin
Descriptions” on page 4. 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 another interrupt, for example the external interrupt. This implies that
one external event might cause several interrupts. The values on the pins are sampled
before detecting edges. If pin change interrupt is enabled, pulses that last longer than
one CPU clock period will generate an interrupt. Shorter pulses are not guaranteed to
generate an interrupt.
The MCU Control Register contains control bits for general MCU functions.
• Bits 7 – Res: Reserved Bit
This bit is a reserved bit in the ATtiny15L and always reads as zero.
• Bit 6- PUD: Pull-up Disable
This PUD bit must be set (one) to disable internal pull-up registers at Port B.
• Bit 5 – SE: Sleep Enable
The SE bit must be set (one) to make the MCU enter the sleep mode when the SLEEP
instruction is executed. To avoid the MCU entering the sleep mode unless it is the pro-
grammer’s purpose, it is recommended to set the Sleep Enable SE bit just before the
execution of the SLEEP instruction.
Bit
$35
Read/Write
Initial Value
R
7
0
PUD
R/W
6
0
R/W
SE
5
0
SM1
R/W
4
0
SM0
R/W
3
0
R
2
0
ISC01
R/W
1
0
ISC00
R/W
0
0
1187H–AVR–09/07
MCUCR

Related parts for attiny15l