English
Language : 

SM8958A Datasheet, PDF (14/25 Pages) SyncMOS Technologies,Inc – 8 - Bit Micro-controller with 32KB flash & 1KB RAM embedded
SyncMOS Technologies Inc.
September 2002
SM8958A
N = BRM[2:0]
000
001
010
011
100
101
110
111
Number of SPWM cycles inserted in an 8-cycle frame
0
1
2
3
4
5
6
7
Example of SPWM timing diagram:
MOV SPWMC , #03H
MOV SPWMD0 , #83H
MOV P1CON , #08H
; Set output frequency (Divider = 16)
; SPWMD0[4:0]=10h (=16T high, 16T low), BRM[2:0] = 3
; Enable P1.3 as SPWM output pin
1st cycle frame 2nd cycle frame 3rd cycle frame 4th cycle frame 5th cycle frame 6th cycle frame 7th cycle frame 8th cycle frame
32T
32T
32T
32T
32T
32T
32T
32T
16T
16T
16T
16T
16T
16T
16T
16T
1T
1T
1T
(narrow pulse inserted by BRM0[2:0] setting, here BRM0[2:0]=3)
SPWM clock = 1 / T = Fosc / 2^(SPFS[1:0]+1)
The SPWM output cycle frame frequency = SPWM clock / 32 = [Fosc/2^(SPFS[1:0]+1)]/32
If user use Fosc=20MHz, SPFS[1:0] of SPWMC=#03H, then
SPWM clock = 20MHz/2^4 = 20MHz/16 = 1.25MHz
SPWM output cycle frame frequency = (20MHz/2^4)/32=39.1KHz
Specifications subject to change without notice,contact your sales representatives for the most recent information.
14/25
Ver 1.0 PID 8958A 09/02