English
Language : 

W79E648 Datasheet, PDF (46/80 Pages) Winbond – Fast 8051 Compatible microcontroller with a redesigned Processor
Preliminary W79E648
ENPWM0/1/2/3/4
f osc
1/2
Prescaler
PWMP
PWM0
8bit counter
PWM1
comparator
PWM0OE
PWM0
(P1.0)
comparator
PWM1OE
PWM1
(P1.1)
PWM2
8bit counter
PWM3
comparator
PWM2OE
PWM2
(P1.2)
comparator
PWM3OE
PWM3
(P1.3)
PWM4
8bit counter
PWM5
comparator
PWM4OE
PWM4
(P1.4)
comparator
PWM5OE
PWM5
(P1.5)
Please refer as below code.
mov pwmcon1, #00110011b
mov pwmcon2, #00000101b
mov pwmp, #40h
mov pwm0, #14h
mov pwm1, #18h
mov pwm2, #20h
mov pwm3, #b0h
mov pwm4, #40h
mov pwmcon1, #11111111b
FIGURE 1 PWM DIAGRAM
; enable pwm3, 2, 1, 0
; enable pwm4
; Fpwm = XT/(2*(1+pwmp)*255)
; duty cycle high/low = pwm0/(255-pmw0)
; output enable pwm3, 2, 1, 0
- 46 -