EasyManua.ls Logo

AMD Elan SC520 - Initialization

AMD Elan SC520
444 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programmable Input/Output
23-6 Élan™SC520 Microcontroller User’s Manual
Note that although the registers to set, clear, and read the PIO pins can be accessed with
32-bit instructions, 32-bit accesses are split into two 16-bit accesses. This means, for
example, that it is impossible to simultaneously set PIO5 and PIO18. Similarly, it is
impossible to sample the state of PIO12 and PIO23 simultaneously; the 32-bit value
returned by the instruction contains two 16-bit values sampled at different times. For 32-
bit operations, the lower 16-bit word (for PIO31–PIO16) is always accessed before the
upper 16-bit word (for PIO15–PIO0). The time between the two accesses is indeterminate
and based on other masters besides the CPU trying to access the bus.
23.6 INITIALIZATION
After a system reset, all of the PIO31–PIO0 signals default to be inputs with pullup or
pulldown resistive termination. The signals must be programmed before using them as
outputs or the alternate interface function.
To initialize the PIOx signals, the following steps are required:
1. Based on the specific application, determine which ÉlanSC520 microcontroller pins can
utilize the PIO function and which should be programmed as the interface function.
2. Program the PIOx Pin Function Select registers to select between the PIO function and
the interface function of each of the PIO31
±
PIO0 pins.
3. For pins specified as using the PIO functionality, define the PIO direction by programming
the PIOx Direction registers.
4. PIO pins that are defined as inputs can now be read via the PIOx Data registers.
5. PIO pins defined as outputs can now be written via the PIOx Data, PIOx Set, or PIOx
Clear registers.

Table of Contents