English
Language : 

AT43USB320A_04 Datasheet, PDF (64/115 Pages) ATMEL Corporation – Full-speed USB Microcontroller with an Embedded Hub
Port A as General
Digital I/O
(PINA) $19($39). The Port A Input Pins address is read only, while the Data Register and the
Data Direction Register are read/write.
The port pins have no selectable pull-up resistors.
Port A Data Register – PORTA
Bit
$1B ($3B)
Read/Write
Initial Value
7
PORTA7
R/W
0
6
PORTA6
R/W
0
5
PORTA5
R/W
0
4
PORTA4
R/W
0
3
PORTA3
R/W
0
2
PORTA2
R/W
0
1
PORTA1
R/W
0
0
PORTA0
R/W
0
PORTA
Port A Data Direction Register – DDRA
Bit
$1A ($3A)
Read/Write
Initial Value
7
DDA7
R/W
0
6
DDA6
R/W
0
5
DDA5
R/W
0
Port A Input Pins Address – PINA
4
DDA4
R/W
0
3
DDA3
R/W
0
2
DDA2
R/W
0
1
DDA1
R/W
0
0
DDA0
R/W
0
DDRA
Bit
$19 ($39)
Read/Write
Initial Value
7
PINA7
R
N/A
6
PINA6
R
N/A
5
PINA5
R
N/A
4
PINA4
R
N/A
3
PINA3
R
N/A
2
PINA2
R
N/A
1
PINA1
R
N/A
0
PINA0
R
N/A
PINA
The Port A Input Pins address (PINA) is not a register, and this address enables access to the
physical value on each Port A pin. When reading PORTA the Port A Data Latch is read, and
when reading PINA, the logical values present on the pins are read.
All 8 pins in Port A have equal functionality when used as digital I/O pins.
PAn, General I/O Pin: The DDAn bit in the DDRA register selects the direction of this pin, if
DDAn is set (one), PAn is configured as an output pin. If DDAn is cleared (zero), PAn is config-
ured as an input pin. If PORTAn 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 PORTAn has to be
cleared (zero) or the pin has to configured as an output pin. The Port A pins are tri-stated
when a reset condition becomes active, even if the clock is not active.
Table 23. DDAn Effects on Port A Pins
DDAn
PORTAn
I/O
0
0
Input
0
1
Input
1
0
Output
1
1
Output
Note: n: 7,6...0, pin number.
Comment
Tri-state (Hi-Z)
Tri-state (Hi-Z)
Push-Pull Zero Output
Push-Pull One Output
Port B
Port B is an 8-bit bi-directional I/O port. The Port B output buffers can sink or source 4 mA.
64 AT43USB320A
1443E–USB–4/04