ATMEGA163 ATMEL [ATMEL Corporation], ATMEGA163 Datasheet - Page 123

no-image

ATMEGA163

Manufacturer Part Number
ATMEGA163
Description
8-bit Microcontroller with 16K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA163-8AC
Manufacturer:
ATMEL
Quantity:
1 600
Part Number:
ATMEGA163-8AI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATMEGA163L-4AI
Manufacturer:
ATMEL
Quantity:
984
Port C
The Port C Data Register –
PORTC
The Port C Data Direction
Register – DDRC
The Port C Input Pins Address
– PINC
Port C as General Digital I/O
1142E–AVR–02/03
Port C is an 8-bit bi-directional I/O port with internal pull-ups.
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
resistors are activated.
Table 47. Port C Pins Alternate Functions
The Port C Input Pins Address – PINC – is not a register, and this address enables
access to the physical value on each Port C pin. When reading PORTC, the PORTC
Data Latch is read, and when reading PINC, the logical values present on the pins are
read.
All eight bits in PORT C are equal 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 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), the pin has to be configured as an output pin, or the
PUD bit has to be set. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
Bit
$15 ($35)
Read/Write
Initial Value
Bit
$14 ($34)
Read/Write
Initial Value
Bit
$13 ($33)
Read/Write
Initial Value
Port Pin
PC0
PC1
PC6
PC7
PORTC7
PINC7
DDC7
R/W
R/W
N/A
R
7
0
7
0
7
Alternate Function
SCL (Two-wire Serial Bus Clock Line)
SDA (Two-wire Serial Bus Data Input/Output Line)
TOSC1 (Timer Oscillator Pin 1)
TOSC2 (Timer Oscillator Pin 2)
PORTC6
PINC6
DDC6
R/W
R/W
N/A
6
0
6
0
6
R
PORTC5
PINC5
DDC5
R/W
R/W
N/A
R
5
0
5
0
5
PORTC4
PINC4
DDC4
R/W
R/W
N/A
R
4
0
4
0
4
PORTC3
PINC3
DDC3
R/W
R/W
N/A
R
3
0
3
0
3
PORTC2
PINC2
DDC2
R/W
R/W
N/A
2
0
2
0
2
R
ATmega163(L)
PORTC1
PINC1
DDC1
R/W
R/W
N/A
R
1
0
1
0
1
PORTC0
PINC0
DDC0
R/W
R/W
N/A
R
0
0
0
0
0
PORTC
DDRC
PINC
123

Related parts for ATMEGA163