English
Language : 

SAMA5D42_14 Datasheet, PDF (348/1776 Pages) ATMEL Corporation – Atmel | SMART ARM-based Embedded MPU
28.5.14 I/O Lines Programming Example
The programming example shown in Table 28-2 is used to obtain the following configuration:
 4-bit output port on I/O lines 0 to 3 (should be written in a single write operation), open-drain, with pull-up
resistor
 Four output signals on I/O lines 4 to 7 (to drive LEDs for example), driven high and low, no pull-up resistor,
no pull-down resistor
 Four input signals on I/O lines 8 to 11 (to read push-button states for example), with pull-up resistors, glitch
filters and input change interrupts
 Four input signals on I/O line 12 to 15 to read an external device status (polled, thus no input change
interrupt), no pull-up resistor, no glitch filter
 I/O lines 16 to 19 assigned to peripheral A functions with pull-up resistor
 I/O lines 20 to 23 assigned to peripheral B functions with pull-down resistor
 I/O lines 24 to 27 assigned to peripheral C with input change interrupt, no pull-up resistor and no pull-down
resistor
 I/O lines 28 to 31 assigned to peripheral D, no pull-up resistor and no pull-down resistor
Table 28-2. Programming Example
Register
PIO_PER
PIO_PDR
PIO_OER
PIO_ODR
PIO_IFER
PIO_IFDR
PIO_SODR
PIO_CODR
PIO_IER
PIO_IDR
PIO_MDER
PIO_MDDR
PIO_PUDR
PIO_PUER
PIO_PPDDR
PIO_PPDER
PIO_ABCDSR1
PIO_ABCDSR2
PIO_OWER
PIO_OWDR
Value to be Written
0x0000_FFFF
0xFFFF_0000
0x0000_00FF
0xFFFF_FF00
0x0000_0F00
0xFFFF_F0FF
0x0000_0000
0x0FFF_FFFF
0x0F00_0F00
0xF0FF_F0FF
0x0000_000F
0xFFFF_FFF0
0xFFF0_00F0
0x000F_FF0F
0xFF0F_FFFF
0x00F0_0000
0xF0F0_0000
0xFF00_0000
0x0000_000F
0x0FFF_ FFF0
348
SAMA5D4 Series [DATASHEET]
Atmel-11238A-ATARM-SAMA5D4-Datasheet_30-Sep-14