SyncMOS Technologies International, Inc.
SM59264
8-Bits Micro-controller
with 128KB flash & 1KB RAM & TWSI & SPWM embedded
SPWM Registers -SPWM Control Register (SPWMC, $A3)
bit-7
bit-0
Unused
Unused
Unused
Unused
Unused
Unused
SPFS1
R/W
0
SPFS0
R/W
0
Read / Write:
Reset value:
-
*
-
*
-
*
-
*
-
*
-
*
SPFS[1:0] : These two bits is 2’s power parameter to form a frequency divider for input clock.
SPFS1
SPFS0
Divider
SPWM clock, Fosc=20MHz
SPWM clock, Fosc=24MHz
0
0
1
1
0
1
0
1
2
4
8
10MHz
5MHz
2.5MHz
1.25MHz
12MHz
6MHz
3MHz
16
1.5MHz
SPWM Registers -SPWM Data Register (SPWMD[4:0], $AC, $A7 ~$A4)
bit-7
bit-0
SPWMD
[4:0]4
R/W
SPWMD
[4:0]3
R/W
SPWMD
[4:0]2
R/W
SPWMD
[4:0]1
R/W
SPWMD
[4:0]0
R/W
BRM
BRM
BRM
[2:0]2
[2:0]1
[2:0]0
Read / Write:
Reset value:
R/W
0
R/W
0
R/W
0
0
0
0
0
0
SPWMD[4:0] : content of SPWM Data Register. It determines duty cycle of SPWM output waveform.
BRM[2:0] : will insert certain narrow pulses among an 8-SPWM-cycle frame
N = BRM[2:0]
000
Number of SPWM cycles inserted in an 8-cycle frame
0
1
2
3
4
5
6
7
001
010
011
100
101
110
111
Example of SPWM timing diagram:
MOV SPWMD0 , #83H
MOV P1CON , #08H
; SPWMD0[4:0]=10h (=16T high, 16T low), BRM[2:0] = 3
; Enable P1.3 as SPWM output pin
Specifications subject to change without notice contact your sales representatives for the most recent information.
Ver 2.1 SM59264 08/2006
19