at90ls8535-8mi ATMEL Corporation, at90ls8535-8mi Datasheet - Page 84

no-image

at90ls8535-8mi

Manufacturer Part Number
at90ls8535-8mi
Description
8-bit Microcontroller With 8k Bytes In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
Port C
Port C Data Register – PORTC
Port C Data Direction Register
– DDRC
Port C Input Pins Address –
PINC
Port C As General Digital I/O
84
AT90S/LS8535
Port C is an 8-bit bi-directional I/O port.
Three I/O memory address locations are allocated for the Port C, one each for the Data
Register – PORTC, $15($35), Data Direction Register – DDRC, $14($34) and the Port C
Input Pins – PINC, $13($33). The Port C 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 C output buffers can
sink 20 mA and thus drive LED displays directly. When pins PC0 to PC7 are used as
inputs and are externally pulled low, they will source current if the internal pull-up resis-
tors are activated.
The Port C Input Pins address (PINC) is not a register; this address enables access to
the physical value on each Port C pin. When reading PORTC, the Port C Data Latch is
read and when reading PINC, the logical values present on the pins are read.
All eight pins in Port C have equal functionality when used as digital I/O pins.
PCn, general I/O pin: The DDCn bit in the DDRC register selects the direction of this pin.
If DDCn is set (one), PCn is configured as an output pin. If DDCn is cleared (zero), PCn
is configured as an input pin. If PORTCn 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,
PORTCn has to be cleared (zero) or the pin has to be configured as an output pin.The
port pins are tri-stated when a reset condition becomes active, even if the clock is not
running.
Table 32. DDCn Effects on Port C Pins
Note:
Bit
$15 ($35)
Read/Write
Initial Value
Bit
$14 ($34)
Read/Write
Initial Value
Bit
$13 ($33)
Read/Write
Initial Value
DDCn
0
0
1
1
n: 7…0, pin number
PORTCn
PORTC7
PINC7
DDC7
N/A
R/W
R/W
R
7
7
0
7
0
0
1
0
1
PORTC6
PINC6
DDC6
N/A
R/W
R/W
R
6
6
0
6
0
Output
Output
Input
Input
I/O
PINC5
PORTC5
DDC5
N/A
R/W
R/W
R
5
5
0
5
0
Pull-up
Yes
No
No
No
PINC4
PORTC4
N/A
DDC4
R/W
R/W
R
4
4
0
4
0
Comment
Tri-state (high-Z)
PCn will source current if ext. pulled low
Push-pull Zero Output
Push-pull One Output
PINC3
PORTC3
N/A
DDC3
R
R/W
R/W
3
3
0
3
0
PINC2
PORTC2
N/A
DDC2
R
2
R/W
R/W
2
0
2
0
PINC1
PORTC1
N/A
DDC1
R
1
R/W
R/W
1
0
1
0
PINC0
N/A
PORTC0
R
DDC0
0
R/W
R/W
0
0
0
0
1041H–11/01
PINC
PORTC
DDRC

Related parts for at90ls8535-8mi