English
Language : 

MC68HC12 Datasheet, PDF (235/478 Pages) Motorola, Inc – The MC68HC912DT128A microcontroller unit (MCU) is a 16-bit device composed of standard on-chip peripherals including a 16-bit central processing unit
Pulse Width Modulator
PWM Register Descriptions
The PWM counters are not reset when PWM channels are disabled. The
counters must be reset prior to a new enable.
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 waveform 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 period value
MC68HC912DT128A — Rev 4.0
MOTOROLA
Pulse Width Modulator
Technical Data
235