English
Language : 

ATXMEGA16E5_14 Datasheet, PDF (30/147 Pages) ATMEL Corporation – 8/16-bit Atmel AVR XMEGA Microcontrollers
16. I/O Ports
16.1
Features
z 26 general purpose input and output pins with individual configuration
z Output driver with configurable driver and pull settings:
z Totem-pole
z Wired-AND
z Wired-OR
z Bus-keeper
z Inverted I/O
z Input with asynchronous sensing with interrupts and events
z Sense both edges
z Sense rising edges
z Sense falling edges
z Sense low level
z Optional pull-up and pull-down resistor on input and Wired-OR/AND configurations
z Optional slew rate control per I/O port
z Asynchronous pin change sensing that can wake the device from all sleep modes
z One port interrupt with pin masking per I/O port
z Efficient and safe access to port pins
z Hardware read-modify-write through dedicated toggle/clear/set registers
z Configuration of multiple pins in a single operation
z Mapping of port registers into bit-accessible I/O memory space
z Peripheral clocks output on port pin
z Real-time counter clock output to port pin
z Event channels can be output on port pin
z Remapping of digital peripheral pin functions
z Selectable USART and timer/counters input/output pin locations
z Selectable Analog Comparator output pin locations
16.2
Overview
One port consists of up to 8 pins ranging from pin 0 to 7. Each port pin can be configured as input or output with
configurable driver and pull settings. They also implement asynchronous input sensing with interrupt and events for
selectable pin change conditions.
Asynchronous pin-change sensing means that a pin change can wake the device from all sleep modes, including the
modes where no clocks are running.
All functions are individual and configurable per pin, but several pins can be configured in a single operation. The pins
have hardware read-modify-write (RMW) functionality for safe and correct change of drive value and/or pull resistor
configuration. The direction of one port pin can be changed without unintentionally changing the direction of any other
pin.
The port pin configuration also controls input and output selection of other device functions. It is possible to have both the
peripheral clock and the real-time clock output to a port pin, and available for external use. The same applies to events
from the event system that can be used to synchronize and control external functions. Other digital peripherals, such as
USART, timer/counters, and analog comparator output can be remapped to selectable pin locations in order to optimize
pin-out versus application needs.
The notations of the ports are PORTA, PORTC, PORTD, and PORTR.
XMEGA E5 [DATASHEET] 30
Atmel-8153I–AVR-ATxmega8E5-ATxmega16E5-ATxmega32E5_Datasheet–08/2014