W79E532/W79L532
+
-
+
-
+
-
+
-
+
-
+
-
PWM5OE
PWM4OE
PWM3OE
PWM2OE
PWM1OE
PWM0 Register
PWM0 Buffer
overflow
PWM0OE
PWM0
P1.0
Fosc
1/2
PWMP
ENPWM0
PWM1 Register
8-bit Up Counter
PWM1 Buffer
overflow
ENPWM1
8-bit Up Counter
PWM1
P1.1
PWM2 Register
PWM2 Buffer
overflow
ENPWM2
8-bit Up Counter
PWM2
P1.2
PWM3 Register
PWM3 Buffer
overflow
ENPWM3
8-bit Up Counter
PWM3
P1.3
PWM4 Register
PWM4 Buffer
overflow
ENPWM4
8-bit Up Counter
PWM4
P1.4
PWM5 Register
PWM5 Buffer
overflow
ENPWM5
8-bit Up Counter
PWM5
P1.5
FIGURE 1 PWM DIAGRAM
Please refer as below code.
mov
mov
mov
mov
mov
mov
mov
mov
mov
pwmcon1, #00110011b
pwmcon2, #00000101b
pwmp, #40h
pwm0, #14h
pwm1, #18h
pwm2, #20h
pwm3, #b0h
pwm4, #40h
pwmcon1, #11111111b
; 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
PWM3 Register
Bit:
7
6
5
4
3
2
1
0
Mnemonic: PWM3
Address: DEH
- 44 -