mc68hc916y3 Freescale Semiconductor, Inc, mc68hc916y3 Datasheet - Page 307

no-image

mc68hc916y3

Manufacturer Part Number
mc68hc916y3
Description
Mc68hc16y3 16 Bit Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
13.11.1 PWM Counter
13.11.2 PWM Function
MC68HC16Y3/916Y3
USER’S MANUAL
The 16-bit counter in the PWM unit is similar to the timer counter in the capture/com-
pare unit. During reset, the GPT is configured to use the system clock divided by two
to drive the counter. Initialization software can reconfigure the counter to use one of
seven prescaler outputs or an external clock input from the PCLK pin.
The PWM count register (PWMCNT) can be read at any time without affecting its val-
ue. A read must be a word access to ensure coherence, but byte accesses can be
made if coherence is not needed. The counter is cleared to $0000 during reset and is
a read-only register except in freeze or test mode.
Fifteen of the sixteen counter bits are output to multiplexers A and B. The multiplexers
provide the fast and slow modes of the PWM unit. Mode for PWMA is selected by the
SFA bit in the PWM control register C (PWMC). Mode for PWMB is selected by the
SFB bit in the same register.
PWMA, PWMB, and PPR[2:0] bits in PWMC control PWM output frequency. In fast
mode, bits [7:0] of PWMCNT are used to clock the PWM logic; in slow mode, bits [14:7]
are used. The period of a PWM output in slow mode is 128 times longer than the fast
mode period. Table 13-3 shows a range of PWM output frequencies using a 16.78
MHz system clock.
The pulse width values of the PWM outputs are determined by control registers PWMA
and PWMB. PWMA and PWMB are 8-bit registers implemented as two bytes of a 16-
bit register. PWMA and PWMB can be accessed as separate bytes or as one 16-bit
register. A value of $00 loaded into either register causes the corresponding output pin
to output a continuous logic level zero signal. A value of $80 causes the corresponding
output signal to have a 50% duty cycle, and so on, to the maximum value of $FF, which
corresponds to an output which is at logic level one for 255/256 of the cycle.
PPR[2:0]
Table 13-3 16.78 MHz PWM Frequency Ranges
000
001
010
011
100
101
110
111
Freescale Semiconductor, Inc.
For More Information On This Product,
Div 16 = 1.05 MHz
Div 128 = 131 kHz
Div 2 = 8.39 MHz
Div 4 = 4.19 MHz
Div 8 = 2.10 MHz
Div 32 = 524 kHz
Div 64 = 262 kHz
Prescaler Tap
GENERAL-PURPOSE TIMER
Go to: www.freescale.com
PCLK
SFA/B = 0
PCLK/256
32.8 kHz
16.4 kHz
8.19 kHz
4.09 kHz
2.05 kHz
1.02 kHz
512 Hz
PCLK/32768
SFA/B = 1
64.0 Hz
32.0 Hz
16.0 Hz
256 Hz
128 Hz
8.0 Hz
4.0 Hz
MOTOROLA
13-19

Related parts for mc68hc916y3