at90pwm81-16se ATMEL Corporation, at90pwm81-16se Datasheet - Page 67

no-image

at90pwm81-16se

Manufacturer Part Number
at90pwm81-16se
Description
8-bit Avr Microcontroller With 8k Bytes In- System Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
10.2
10.2.1
7734M–AVR–03/10
Ports as General Digital I/O
Configuring the Pin
The ports are bi-directional I/O ports with optional internal pull-ups.
description of one I/O-port pin, here generically called Pxn.
Figure 10-2.
Note:
Each port pin consists of three register bits: DDxn, PORTxn, and PINxn. As shown in
tion for I/O-Ports” on page
the PORTx I/O address, and the PINxn bits at the PINx I/O address.
The DDxn bit in the DDRx Register selects the direction of this pin. If DDxn is written logic one, Pxn is
configured as an output pin. If DDxn is written logic zero, Pxn is configured as an input pin.
If PORTxn is written logic one when the pin is configured as an input pin, the pull-up resistor is activated.
To switch the pull-up resistor off, PORTxn has to be written logic zero or the pin has to be configured as
an output pin
The port pins are tri-stated when reset condition becomes active, even if no clocks are running.
1. WRx, WPx, WDx, RRx, RPx, and RDx are common to all pins within the same port. clk
Pxn
PUD are common to all ports.
General Digital I/O
SLEEP: SLEEP CONTROL
clk
PUD: PULLUP DISABLE
I/O
80, the DDxn bits are accessed at the DDRx I/O address, the PORTxn bits at
: I/O CLOCK
(1)
SLEEP
SYNCHRONIZER
WDx: WRITE DDRx
RDx: READ DDRx
WRx: WRITE PORTx
RRx: READ PORTx REGISTER
RPx: READ PORTx PIN
WPx: WRITE PINx REGISTER
D
L
Q
Q
D
PINxn
Figure 10-2
Q
Q
AT90PWM81
RESET
RESET
PORTxn
Q
Q
Q
Q
DDxn
CLR
CLR
D
D
shows a functional
RRx
“Register Descrip-
I/O
PUD
WDx
RDx
RPx
clk
, SLEEP, and
1
0
I/O
WPx
WRx
67

Related parts for at90pwm81-16se