English
Language : 

SM8958B Datasheet, PDF (44/49 Pages) SyncMOS Technologies,Inc – 256 bytes SRAM as standard 8052
SM8958B
8-Bit Micro-controller
32KB Flash
& 1KB RAM embedded
12. Pulse Width Modulation (PWM)
There are two PWM channels in SM8958B. The resolution of PWM channel can be 8-bit or 5-bit depending on the
setting on corresponding PBS bit in PWMCn register, where n-0 or 1.
System clock PWMPS
(2-bit timer)
{ PFS1,PFS0 }
4
PWMCLK
MUX
PWMTB
(8-bit timer)
COUNT[7:0]
8-bit or 5-bit Logic
Comparator
CMPOUT
PWMOUTn
To P1.2 and P1.3
2
PBS
( 1 for 5-bit PWM)
PWMDn[7:5] PWMDn[4:0] n=0,1
Figure : PWMn functional block
Mnemonic Description Dir. Bit 7
P1CON
PWMC0
PWMC1
PWMD0
PWMD1
P1 Control
Register
PWM Control
Register 0
PWM Control
Register 1
PWM Data
Register 0
PWM Data
Register 1
9BH
D3H
D4H
B3H
B4H
SDAE
-
-
D0.7
D1.7
Mnemonic: P1CON
7
6
5
SDAE SCLE
-
Bit 6
SCLE
-
-
D0.6
D1.6
4
-
Bit 5
PWM
-
Bit 4
-
-
-
-
-
D0.5
D0.4
D1.5
D1.4
Bit 3
Bit 2
PWM1E PWM0E
-
PBS
-
PBS
D0.3
D0.2
D1.3
D1.2
Bit 1
-
PFS1
PFS1
D0.1
D1.1
Bit 0
-
PFS0
PFS0
D0.0
D1.0
3
2
1
PWM1E PWM0E
-
Address: 9Bh
0
Reset
-
00h
RST
00H
00H
00H
00H
00H
PWM1E: Set 1 to configure P1[3] as PWM channel 1 output.
PWM0E: Set 1 to configure P1[2] as PWM channel 0 output.
Mnemonic: PWMC[0:1]
Address: D3h and D4h
7
6
5
4
3
2
1
0
Reset
-
-
-
-
-
PBS PFS1 PFS0 00h
PBS: When set, the PWM is 5 bits resolution.
PFS [1:0]: The PWM clock divider select.
PFS1
0
0
1
1
PFS0
0
1
0
1
PWM clock divider select
2
4
8
16
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M085
Ver D SM8958B 08/07/2015
- 44 -