English
Language : 

M38027E8SP Datasheet, PDF (24/51 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
3802 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
PULSE WIDTH MODULATION (PWM)
The 3802 group has a PWM function with an 8-bit resolution,
based on a signal that is the clock input XIN or that clock input di-
vided by 2.
Data Setting
The PWM output pin also functions as port P56. Set the PWM pe-
riod by the PWM prescaler, and set the period during which the
output pulse is an “H” by the PWM register.
If the value in the PWM prescaler is n and the value in the PWM
register is m (where n = 0 to 255 and m = 0 to 255) :
PWM period = 255 ! (n+1)/f(XIN)
= 51 ! (n+1) µs (when XIN = 5 MHz)
Output pulse “H” period = PWM period ! m/255
= 0.2 ! (n+1) ! m µs
(when XIN = 5 MHz)
PWM Operation
When bit 0 (PWM enable bit) of the PWM control register is set to
“1”, operation starts by initializing the PWM output circuit, and
pulses are output starting at an “H”.
If the PWM register or PWM prescaler is updated during PWM
output, the pulses will change in the cycle after the one in which
the change was made.
51 ! m ! (n+1) µs
255
PWM output
T = [51 ! (n+1)] µs
m: Contents of PWM register
n : Contents of PWM prescaler
T : PWM cycle (when X IN = 5 MHz)
Fig. 18 Timing of PWM cycle
Data bus
PWM
prescaler pre-latch
PWM
register pre-latch
Transfer control circuit
PWM
prescaler latch
Count source
selection bit
“0”
XIN
PWM prescaler
1/2 “1”
PWM
register latch
PWM register
Fig. 19 Block diagram of PWM function
Port P56
Port P56 latch
PWM enable bit
24