DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

AT90S1200 Ver la hoja de datos (PDF) - Atmel Corporation

Número de pieza
componentes Descripción
Fabricante
AT90S1200 Datasheet PDF : 71 Pages
First Prev 21 22 23 24 25 26 27 28 29 30 Next Last
AT90S1200
I/O Ports
All AVR ports have true Read-Modify-Write functionality when used as general digital
I/O ports. This means that the direction of one port pin can be changed without uninten-
tionally changing the direction of any other pin with the SBI and CBI instructions. The
same applies for changing drive value (if configured as output) or enabling/disabling of
pull-up resistors (if configured as input).
Port B
Port B is an 8-bit bi-directional I/O port.
Three I/O memory address locations are allocated for the Port B, one each for the Data
Register PORTB ($18), Data Direction Register DDRB ($17), and the Port B Input
Pins PINB ($16). The Port B Input Pins address is read-only, while the Data Register
and the Data Direction Register are read/write.
All port pins have individually selectable pull-up resistors. The Port B output buffers can
sink 20 mA and thus drive LED displays directly. When pins PB0 to PB7 are used as
inputs and are externally pulled low, they will source current if the internal pull-up resis-
tors are activated.
The Port B pins with alternate functions are shown in Table 8.
Table 8. Port B Pin Alternate Functions
Port Pin
Alternate Functions
PB0
AIN0 (Analog Comparator positive input)
PB1
AIN1 (Analog Comparator negative input)
PB5
MOSI (Data Input line for memory downloading)
PB6
MISO (Data Output line for memory uploading)
PB7
SCK (Serial Clock input)
When the pins are used for the alternate function, the DDRB and PORTB register has to
be set according to the alternate function description.
Port B Data Register PORTB
Bit
$18
Read/Write
Initial Value
7
PORTB7
R/W
0
6
PORTB6
R/W
0
5
PORTB5
R/W
0
4
PORTB4
R/W
0
3
PORTB3
R/W
0
2
PORTB2
R/W
0
1
PORTB1
R/W
0
0
PORTB0
R/W
0
PORTB
Port B Data Direction Register
DDRB
Bit
$17
Read/Write
Initial Value
7
DDB7
R/W
0
6
DDB6
R/W
0
5
DDB5
R/W
0
4
DDB4
R/W
0
3
DDB3
R/W
0
2
DDB2
R/W
0
1
DDB1
R/W
0
0
DDB0
R/W
0
DDRB
Port B Input Pin Address
PINB
Bit
$16
Read/Write
Initial Value
7
PINB7
R
N/A
6
PINB6
R
N/A
5
PINB5
R
N/A
4
PINB4
R
N/A
3
PINB3
R
N/A
2
PINB2
R
N/A
1
PINB1
R
N/A
0
PINB0
R
N/A
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.
29
0838HAVR03/02

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]