Motorola MPC823e Reference Manual page 944

Microprocessor for mobile computing
Table of Contents

Advertisement

Communication Processor Module
When the pin is configured as an output, port C interrupts cannot be generated. To configure
a port C pin as a general-purpose output pin, follow these steps:
1. Write the corresponding PCPAR bit with a zero.
2. Write the corresponding PCDIR bit with a 1.
3. Write the corresponding PCSO bit with a zero (for clarity).
4. The corresponding PCINT bit is a "don't care" bit.
5. Write the pin value using the PCDAT register.
To configure a port C pin as a general-purpose input pin that does not generate an interrupt,
follow these steps:
1. Write the corresponding PCPAR bit with a zero.
2. Write the corresponding PCDIR bit with a zero.
3. Write the corresponding PCSO bit with a zero.
4. The corresponding PCINT bit is a "don't care" bit.
5. Write the corresponding CIMR bit with a zero to prevent interrupts from being
generated to the core.
6. Read the pin value using the PCDAT register.
When a port C pin is configured as a general-purpose input pin, a change in the port C
interrupt register (PCINT) causes an interrupt request signal to be sent to the CPM interrupt
controller. You can program each port C line to assert an interrupt request when a
high-to-low change occurs or when any change occurs. Each port C line asserts a unique
interrupt request to the CPM interrupt pending register and has a different internal interrupt
priority level within the CPM interrupt controller. Refer to Section 16.15 The CPM Interrupt
Controller for more details. Each request can be masked independently in the CPM
interrupt mask register. To configure a port C pin as a general-purpose input pin that
generates an interrupt, follow these steps:
1. Write the corresponding PCPAR bit with a zero.
2. Write the corresponding PCDIR bit with a zero.
3. Write the corresponding PCSO bit with a zero.
4. Set the PCINT bit to discover the edges that cause the interrupts.
5. Write the corresponding CIMR bit with a 1 so that interrupts can be sent to the core.
6. Read the pin value using the PCDAT register.
16-490
MPC823e REFERENCE MANUAL
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents