AT43USB320A_04 ATMEL [ATMEL Corporation], AT43USB320A_04 Datasheet - Page 66

no-image

AT43USB320A_04

Manufacturer Part Number
AT43USB320A_04
Description
Full-speed USB Microcontroller with an Embedded Hub
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
Port B as General
Digital I/O
66
AT43USB320A
Port B Data Register – PORTB
Port B Data Direction Register – DDRB
Port B Input Pins Address – PINB
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 Port B Data Latch is read, and
when reading PINB, the logical values present on the pins are read.
All 8 pins in port B have equal functionality 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 con-figured as an output pin. If DDBn is cleared (zero), PBn is con-
figured 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 configured as an output pin. The Port B pins are tri-stated
when a reset condition becomes active, even if the clock is not active.
Table 25. DDBn Effects on Port B Pins
Note:
Initial Value
Initial Value
Initial Value
Read/Write
Read/Write
Read/Write
$18 ($38)
$17 ($37)
$16 ($36)
Bit
Bit
Bit
DDBn
0
0
1
1
n: 7, 6...0, pin number.
PORTB7
PINB7
DDB7
R/W
R/W
N/A
R
7
0
7
7
0
PORTBn
0
1
0
1
PORTB6
PINB6
DDB6
R/W
R/W
N/A
R
6
0
6
0
6
PORTB5
PINB5
DDB5
R/W
R/W
N/A
Output
Output
R
5
0
5
0
5
Input
Input
I/O
PORTB4
PINB4
DDB4
R/W
R/W
N/A
R
4
0
4
0
4
Comment
Tri-state (Hi-Z)
Tri-state (Hi-Z)
Push-Pull Zero Output
Push-Pull One Output
PORTB3
PINB3
DDB3
R/W
R/W
N/A
3
R
3
0
3
0
PORTB2
PINB2
DDB2
R/W
R/W
N/A
R
2
2
0
2
0
PORTB1
PINB1
DDB1
R/W
R/W
N/A
R
1
0
1
0
1
PORTB0
PINB0
DDB0
R/W
R/W
N/A
0
R
0
0
0
0
1443E–USB–4/04
DDRB
PINB
PORTB

Related parts for AT43USB320A_04