
Programmable Input/Output
Élan™SC520 Microcontroller User’s Manual
23-5
23.5.1
Configuration Information
23.5.1.1
PIO Pins and Simple Input
PIO pins are selected for simple input when the system powers up. The input value of the
pins can be read using the PIOx Data registers.
Only two actions disable simple input on the PIO pin:
■
Selecting the pin’s interface function
■
Setting the PIO’s PIOx_DIR bit in the PIOx Direction register to configure the PIO as an
output
23.5.1.2
PIO Pins and Simple Output
If the PIO pin's interface function has not been selected, and the PIOx_DIR is set, the PIO
will be an output. The value of the pin can be set by writing to its bit in the PIOx Set and
PIOx Clear registers, or by using the appropriate PIOx Data register.
23.5.2
Software Considerations
Table 23-3 summarizes the register settings required to configure the PIOs.
Table 23-3
PIO Configuration Summary
Function
Select
Register
Bit
Direction
Register
Bit
Data
Register
Bit
(Writes)
Set
Register
Bit
Clear
Register
Bit
Data
Register
Bit
(Reads)
1
Notes:
1. The Data Register Bit (Reads) column shows the resulting state of the Data register bit and the corresponding
PIO pin.
Resulting Programmable I/O Pin Function
1
X
2
2. X = Not used in this operation.
X
X
X
?
3
3. ? = Input value. (The Data register bit state always reflects the corresponding pin state, whether input or output.)
The pin is not a PIO; it uses its interface function. The
value of the pin can be read at the Data bit, but writes to
the Direction, Data, Set, and Clear bits have no effect.
0
0
X
X
X
?
The PIO is an input. The state of the pin can be read at
the Data bit. Writes to the Data, Set and Clear bits have
no effect.
0
1
X
X
1
4
4. For a particular PIO output operation, only one of the pin’s Data, Set, or Clear bits can be used. The state of the
unused bits is not important, but subsequent writes to these bits can change the PIO pin state.
0
The PIO is an output. The 1 that is written to the Clear bit
causes this PIO pin to be driven Low. The state of the pin
can be read at the Data bit, (in this case the pin is Low).
0
1
X
1
X
1
The PIO is an output. The 1 that is written to the Set bit
causes this PIO pin to be driven High. The state of the
pin can be read at the Data bit, (in this case the pin is
High).
0
1
0
X
X
0
The PIO is an output. The 0 that is written to the Data bit
causes this PIO pin to be driven Low. The state of the pin
can be read at the Data bit, (in this case the pin is Low).
0
1
1
X
X
1
The PIO is an output. The 1 that is written to the Data bit
causes this PIO pin to be driven High. The state of the pin
can be read at the Data bit, (in this case the pin is High).
Summary of Contents for Elan SC520
Page 1: ...lan SC520 Microcontroller User s Manual Order 22004A...
Page 4: ...iv lan SC520 Microcontroller User s Manual...
Page 28: ...Introduction xxviii lan SC520 Microcontroller User s Manual...
Page 42: ...Architectural Overview 1 14 lan SC520 Microcontroller User s Manual...
Page 78: ...System Initialization 3 22 lan SC520 Microcontroller User s Manual...
Page 108: ...Clock Generation and Control 5 10 lan SC520 Microcontroller User s Manual...
Page 118: ...Reset Generation 6 10 lan SC520 Microcontroller User s Manual...
Page 148: ...System Arbitration 8 24 lan SC520 Microcontroller User s Manual...
Page 214: ...SDRAM Controller 10 36 lan SC520 Microcontroller User s Manual...
Page 230: ...Write Buffer and Read Buffer 11 16 lan SC520 Microcontroller User s Manual...
Page 288: ...GP Bus DMA Controller 14 22 lan SC520 Microcontroller User s Manual...
Page 316: ...Programmable Interval Timer 16 8 lan SC520 Microcontroller User s Manual...
Page 328: ...Software Timer 18 4 lan SC520 Microcontroller User s Manual...
Page 346: ...Real Time Clock 20 12 lan SC520 Microcontroller User s Manual...
Page 360: ...UART Serial Ports 21 14 lan SC520 Microcontroller User s Manual...
Page 414: ...AMDebug Technology 26 8 lan SC520 Microcontroller User s Manual...