AT90LS2343 ATMEL [ATMEL Corporation], AT90LS2343 Datasheet - Page 35

no-image

AT90LS2343

Manufacturer Part Number
AT90LS2343
Description
8-Bit Microcontroller with 2K Bytes of In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT90LS2343-4SI
Manufacturer:
FUJI
Quantity:
12
I/O Port B
Port B Data Register – PORTB
Port B Data Direction Register
– DDRB
1004D–09/01
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 unintention-
ally 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).
For the AT90S/LS2323, Port B is an 3-bit bi-directional I/O port. For the AT90S/LS2343,
Port B is a 5-bit bi-directional I/O port.
Please note: Bits 3 and 4 in the description of PORTB, DDRB and PINB do not apply to
the AT90S/LS2323. They are read only with a value of 0.
Three I/O memory address locations are allocated for Port B, one each for the Data
Register – PORTB, $18 ($38), Data Direction Register – DDRB, $17($37) and the Port
B Input Pins – PINB, $16($36). 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 PB4 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 12.
Table 12. Port B Pin Alternate Functions
When the pins are used for the alternate function the DDRB and PORTB register has to
be set according to the alternate function description.
Bit
$18 ($38)
Read/Write
Initial Value
Bit
$17 ($37)
Read/Write
Initial Value
Port Pin
PB0
PB1
PB2
PB3
R
R
7
0
7
0
Alternate Functions
MOSI (Data input line for memory downloading)
MISO (Data output line for memory uploading)
INT0 (External Interrupt0 Input)
SCK (Serial clock input for serial programming)
TO (Timer/Counter0 counter clock input)
CLOCK (Clock input, AT90S/LS2343 only)
R
R
6
0
6
0
R
R
5
0
5
0
PORTB4
DDB4
R/W
R/W
4
0
4
0
PORTB3
DDB3
R/W
R/W
3
0
3
0
AT90S/LS2323/2343
PORTB2
DDB2
R/W
R/W
2
0
2
0
PORTB1
DDB1
R/W
R/W
1
0
1
0
PORTB0
DDB0
R/W
R/W
0
0
0
0
PORTB
DDRB
35

Related parts for AT90LS2343