Input/Output (I/O) Ports
Data Sheet
MC68HC908SR12MC68HC08SR12 — Rev. 5.0
328
Input/Output (I/O) Ports
Freescale Semiconductor
PWM[2:0] — PWM Channels 0 to 2
PWM[2:0] are pins used for the output channels from the pulse width
modulator (PWM) module. The PWM enables bit, PCH[2:0], in the
PWM control register define which port pin will be used as a PWM
output and overrides any control from the port I/O logic. The PWM0
function on PCT0/PWM0/CD pin can be overrided by the CD output
function. See
Section 13. Pulse Width Modulator (PWM)
.
ATD[12:8] — ADC channels 8 to 12
ATD[12:8] are pins used for the input channels to the analog-to-digital
converter module. The channel select bits, ADCH[4:0], in the ADC
status and control register define which port pin will be used as an
ADC input and overrides any control from the port I/O logic. See
Section 15. Analog-to-Digital Converter (ADC)
.
NOTE:
Care must be taken when reading port C while applying analog voltages
to ATD[12:8] pins. If the appropriate ADC channel is not enabled,
excessive current drain may occur if analog voltages are applied to the
PTCx/ATDx pin, while PTC is read as a digital input. Those ports not
selected as analog input channels are considered digital I/O ports.
CD — Current Detect Output Pin
The CD pin is used for the current detect output from the analog
module. The pin reflects the status of the current detect interrupt flag.
The current detect output enable bit, CDOEN, in the configuration
register 2 enables the PTC0/PWM0/CD pin as the CD output pin and
overrides any control from the port I/O or PWM logic. See
Section 14.
Analog Module
.
LED drive — Direct LED drive Pins
PTC7–PTC3 pins can be configured for direct LED drive. See
18.5.3
Port C LED Control Register (LEDC)
.
Table 18-5. PTC0 Pin Configuration
Pin
CDOEN Bit
($001D)
PCH0 Bit
($0051)
Pin function
PTC0/PWM0/CD
0
0
PTC0
0
1
PWM0
1
X
CD