MC68HC711PH8 Motorola, MC68HC711PH8 Datasheet - Page 161

no-image

MC68HC711PH8

Manufacturer Part Number
MC68HC711PH8
Description
High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcomputer Unit
Manufacturer
Motorola
Datasheet
PAII and PAIF — Pulse accumulator input edge interrupt enable and flag
The PAIF status bit is automatically set each time a selected edge is detected at the PA7/PAI/OC1
pin. To clear this status bit, write to the TFLG2 register with a one in the corresponding data bit
position (bit 4). The PAII control bit allows the pulse accumulator input edge detect to be
configured for polled or interrupt-driven operation but does not affect setting or clearing the PAIF
bit. When PAII is zero, pulse accumulator input interrupts are inhibited, and the system operates
in a polled mode. In this mode, the PAIF bit must be polled by user software to determine when
an edge has occurred. When the PAII control bit is set, a hardware interrupt request is generated
each time PAIF is set. Before leaving the interrupt service routine, software must clear PAIF.
8.2
The PWM timer subsystem provides up to four 8-bit pulse-width modulated waveforms on the port
H pins. Channel pairs can be concatenated to create 16-bit PWM outputs. Three clock sources
(A, B, and S) and a flexible clock select scheme give the PWM a wide range of frequencies.
Four control registers configure the PWM outputs — PWCLK, PWPOL, PWSCAL, and PWEN.
The PWCLK register selects the prescale value for the PWM clock sources and enables the 16-bit
PWM functions. The PWPOL register determines each channel’s polarity and selects the clock
source for each channel. The PWSCAL register derives a user-scaled clock based on the A clock
source, and the PWEN register enables the PWM channels.
Each channel also has a separate 8-bit counter, period register, and duty cycle register. The period
and duty cycle registers are double buffered so that if they are changed while the channel is
enabled, the change does not take effect until the counter rolls over or the channel is disabled. A
new period or duty cycle can be forced into effect immediately by writing to the period or duty cycle
register and then writing to the counter.
With PWMs configured for 8-bit mode and E equal to 4MHz, PWM signals can be produced from
40 kHz (1% duty cycle resolution) to less than 10 cycles per second (approximately 0.4% duty
cycle resolution). By configuring the PWMs for 16-bit mode with E equal to 4MHz, PWM periods
greater than one minute are possible.
In 16-bit mode, duty cycle resolution of up to 15 parts per million can be achieved (at a PWM
frequency of 60Hz). In the same system, a PWM frequency of 1kHz corresponds to a duty cycle
resolution of 0.025%.
MC68HC11PH8
Pulse-width modulation (PWM) timer
TIMING SYSTEM
PH0
PH1
PH2
PH3
Pin
Alternate
function
PW1
PW2
PW3
PW4
MOTOROLA
TPG
8-27
8

Related parts for MC68HC711PH8