Programmable I/O Signals
9-6
Am186™CC/CH/CU Microcontrollers User’s Manual
9.5.3
Driving Data on the PIO
If a PIO signal is enabled as an output, the value in the corresponding bit in the PIO Data
register is driven on the signal with no inversion.
Whether a PIO signal is enabled as an input or as an output, a synchronized value from
the PIO signal is reflected in the value of the corresponding bit in the PIO Data register,
with no inversion for PIO Data register reads.
9.5.4
Using PIOs as Open-Drain Outputs
The PIO Data registers permit the PIO signals to operate as open-drain outputs. This is
accomplished by keeping the appropriate PDATA bits constant in the PIO Data and PIO
Mode registers and writing the data value into its associated bit position in the PIO Direction
register. The output is either driving Low or is disabled, depending on the data.
9.5.5
Setting and Clearing Data
The Am186CC/CH/CU microcontrollers offer two additional registers, which can be used
to set and clear the PIO Data register. A write to the PIO Set or PIO Clear registers functions
as shown in Table 9-4; a read does not change the PIO Data register contents. A read of
the PIO Set or PIO Clear registers returns the last value written by software in the
corresponding PIO Data register (including changes made via the PIO Set and PIO Clear
registers). This enables software to read back the value that would be driven if a PIO is
changed from an input to an output.
Table 9-3
PIO Mode and PIO Direction Register Bit Settings
Mode
PIO
Mode
Register
PIO
Direction
Register
Pin Function
Alternate Operation
0
0
Alternate operation with pullup/pulldown (PIO
functionality disabled)
PIO
0
1
PIO input with pullup/pulldown
1
Notes:
1. The following PIO signals can be configured as interrupt sources in the interrupt controller’s
Shared Mask (SHMASK) register: PIO5, PIO15, PIO27, PIO29, PIO30, PIO33, PIO34, and PIO35.
Typically, these signals should be configured as inputs when used as an interrupt source. However,
if any of these signals is configured as both a PIO output and as an interrupt source, the PIO output
signal generates interrupts.
1
0
PIO output with pullup/pulldown
1
1
PIO input without pullup/pulldown
Table 9-4
PIO Set and PIO Clear Registers’ Effect on PIO Data Register
PIO Set Register Function
PIO Clear Register Function
Written to
PIO Set
Register Bit
Old
PIO Data
Register Bit
New
PIO Data
Register Bit
Written to
PIO Clear
Register Bit
Old
PIO Data
Register Bit
New
PIO Data
Register Bit
0
0
0
0
0
0
0
1
1
0
1
1
1
0
1
1
0
0
1
1
1
1
1
0
Summary of Contents for Am186 CC
Page 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Page 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Page 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Page 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Page 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Page 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Page 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Page 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Page 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...