Datasheet
142
ATmega323(L)
1457E–11/01
Figure 74. Port B Schematic Diagram (Pin PB7)
Port C Port C is an 8-bit bi-directional I/O port with optional 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 20mA 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.
DATA BUS
D
D
Q
Q
RESET
RESET
C
C
WD
WP
RD
MOS
PULL-
UP
PB7
R
R
WP:
WD:
RL:
RP:
RD:
SPE:
MSTR
WRITE PORTB
WRITE DDRB
READ PORTB LATCH
READ PORTB PIN
READ DDRB
SPI ENABLE
MASTER SELECT
DDB7
PORTB7
SPE
MSTR
SPI ClLOCK
OUT
SPI CLOCK
IN
RL
RP
PUD
PUD: PULL-UP DISABLE
Table 51. Port C Pins Alternate Functions
Port Pin Alternate Function
PC0 SCL (2-wire Serial Bus Clock Line)
PC1 SDA (2-wire Serial Bus Data Input/Output Line)
PC2 TCK (JTAG Test Clock)
PC 3 T MS ( J TAG Te st M od e Se le ct )
PC4 TDO (JTAG Test Data Out)
PC5 TDI (JTAG Test Data In)
PC6 TOSC1 (Timer Oscillator Pin 1)
PC7 TOSC2 (Timer Oscillator Pin 2)