English
Language : 

MC68HC912BL16 Datasheet, PDF (73/128 Pages) Freescale Semiconductor, Inc – 16-Bit Microcontroller
Freescale Semiconductor, Inc.
by two to generate clock S1.
PWSCNT1 — PWM Scale Counter 1 Value
$0047
Bit 7
6
5
4
3
2
1
Bit 0
Bit 7
6
5
4
3
2
1
Bit 0
RESET:
0
0
0
0
0
0
0
0
PWSCNT1 is a down-counter that, upon reaching $00, loads the value of PWSCAL1. Read any time.
PWCNTx — PWM Channel Counters
Bit 7
6
5
4
3
2
1
Bit 0
PWCNT0 Bit 7
6
5
4
3
2
1
Bit 0
$0048
PWCNT1 Bit 7
6
5
4
3
2
1
Bit 0
$0049
PWCNT2 Bit 7
6
5
4
3
2
1
Bit 0
$004A
PWCNT3 Bit 7
6
5
4
3
2
1
Bit 0
$004B
RESET:
0
0
0
0
0
0
0
0
Read and write anytime. A write will cause the PWM counter to reset to $00.
In special mode, if DISCR = 1, a write does not reset the PWM counter.
Each counter may be read any time without affecting the count or the operation of the corresponding
PWM channel. Writes to a counter cause the counter to be reset to $00 and force an immediate load of
both duty and period registers with new values. To avoid a truncated PWM period, write to a counter
while the counter is disabled. In left-aligned output mode, resetting the counter and starting the wave-
form output is controlled by a match between the period register and the value in the counter. In center-
aligned output mode the counters operate as up/down counters, where a match in period changes the
counter direction. The duty register changes the state of the output during the period to determine the
duty.
When a channel is enabled, the associated PWM counter starts at the count in the PWCNTx register
using the clock selected for that channel.
In special mode, when DISCP = 1 and configured for left-aligned output, a match of period does not
reset the associated PWM counter.
PWPERx — PWM Channel Period Registers
Bit 7
6
5
4
3
2
1
Bit 0
PWPER0 Bit 7
6
5
4
3
2
1
Bit 0
$004C
PWPER1 Bit 7
6
5
4
3
2
1
Bit 0
$004D
PWPER2 Bit 7
6
5
4
3
2
1
Bit 0
$004E
PWPER3 Bit 7
6
5
4
3
2
1
Bit 0
$004F
RESET:
1
1
1
1
1
1
1
1
Read and write anytime.
The value in the period register determines the period of the associated PWM channel. If written while
the channel is enabled, the new value will not take effect until the existing period terminates, forcing the
counter to reset. The new period is then latched and is used until a new period value is written. Reading
this register returns the most recent value written. To start a new period immediately, write the new pe-
riod value and then write the counter forcing a new period to start with the new period value.
Period = Channel-Clock-Period × (PWPER + 1)
Period = Channel-Clock-Period × PWPER × 2
(CENTR = 0)
(CENTR = 1)
MC68HC912BL16TS/D
For More Information On This Product,
73
Go to: www.freescale.com