attiny15l ATMEL Corporation, attiny15l Datasheet - Page 52

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
The Port B Input Pins Address
– PINB
PORT B as General Digital I/O
Alternate Functions of Port B
52
ATtiny15L
The Port B Input Pins address (PINB) is not a register, and this address enables access
to the physical value on each Port B pin. When reading PORTB, the PORTB Data Latch
is read, and when reading PINB, the logical values present on the pins are read.
The lower five pins in Port B are equal when used as digital I/O pins.
PBn, general I/O pin: The DDBn bit in the DDRB Register selects the direction of this
pin. If DDBn is set (one), PBn is configured as an output pin. If DDBn is cleared (zero),
PBn is configured as an input pin. If PORTBn is set (one) when the pin is configured as
an input pin, the MOS pull-up resistor is activated. To switch the pull-up resistor off, the
PORTBn has to be cleared (zero) or the pin has to be configured as an output pin. Pull-
ups for all ports can be disabled also by setting PUD-bit in the MCUCR Register.
Table 22. DDBn Effects on Port B Pins
Note:
On ATtiny15L, PB5 is input or open-drain output. Because this pin is used for 12V pro-
gramming, there is no ESD protection diode limiting the voltage on the pin to
V
does not rise above V
reset or enter Programming mode unintentionally.
All Port B pins are connected to a pin change detector that can trigger the pin change
interrupt. See “Pin Change Interrupt” on page 22 for details.
The alternate pin functions of Port B are:
• RESET – PORT B, Bit 5
When the RSTDISBL Fuse is unprogrammed, this pin serves as External Reset. When
the RSTDISBL Fuse is programmed, this pin is a general input pin or a open-drain out-
put pin. If DDB5 is cleared (zero), PB5 is configured as an input pin. If DDB5 is set
(one), the pin is a open-drain output.
• SCK/INT0/T0 – PORT B, Bit 2
In Serial Programming mode, this pin serves as the serial clock input, SCK.
In Normal mode, this pin can serve as the external interrupt0 input. See the interrupt
description for details on how to enable this interrupt. Note that activity on this pin will
trigger the interrupt even if the pin is configured as an output.
Bit
$16
Read/Write
Initial Value
CC
DDBn
0
0
0
1
1
+ 0.5V. Thus, special care should be taken to ensure that the voltage on this pin
1. n: 4, 3…0, pin number.
PORTBn
R
7
0
0
1
1
0
1
CC
R
0
6
Output
Output
Input
Input
Input
I/O
+ 1V during normal operation. This may cause the MCU to
PINB5
N/A
R
5
Pull-up
Yes
No
No
No
No
PINB4
(1)
N/A
R
4
Comment
Tri-state (High-Z)
PUD bit in the MCUCR Register is set.
PBn will source current if ext. pulled low.
PUD bit in the MCUCR Register is cleared.
Push-pull Zero Output
Push-pull One Output
PINB3
N/A
R
3
PINB2
N/A
2
R
PINB1
N/A
R
1
PINB0
N/A
R
1187H–AVR–09/07
0
PINB

Related parts for attiny15l