Download Print this page

STC micro STC8A8K64D4 Series Reference Manual page 574

Advertisement

STC8A8K64D4 Series Manual
P5M0 = 0x00;
P5M1 = 0x00;
PWMSET = 0x01;
the module is enabled.)
P_SW2 = 0x80;
PWMCKS = 0x00;
PWMC = CYCLE;
PWM0T1= 0x0000;
PWM0T2= 0x0001;
PWM0CR= 0x80;
P_SW2 = 0x00;
PWMCFG = 0x05;
EA = 1;
while (1);
}
Assembly code
;Operating frequency for test is 11.0592MHz
CYCLE
EQU
P_SW2
DATA
PWMSET
DATA
PWMCFG
DATA
PWMCH
EQU
PWMCL
EQU
PWMCKS
EQU
PWMTADCH
EQU
PWMTADCL
EQU
PWMIF
EQU
PWMFDCR
EQU
PWM0T1H
EQU
PWM0T1L
EQU
PWM0T2H
EQU
PWM0T2L
EQU
PWM0CR
EQU
PWM0HLD
EQU
P0M1
DATA
P0M0
DATA
P1M1
DATA
P1M0
DATA
P2M1
DATA
P2M0
DATA
P3M1
DATA
P3M0
DATA
P4M1
DATA
P4M0
DATA
P5M1
DATA
P5M0
DATA
1000H
0BAH
0F1H
0F6H
0FF00H
0FF01H
0FF02H
0FF03H
0FF04H
0FF05H
0FF06H
0FF10H
0FF11H
0FF12H
0FF13H
0FF14H
0FF15H
093H
094H
091H
092H
095H
096H
0B1H
0B2H
0B3H
0B4H
0C9H
0CAH
//Enable PWM module (The configuration is effective only after
// The clock of PWM is the system clock
//Set PWM period
//enable PWM0 output
//Start PWM module and enable PWM interrput
- 558 -

Advertisement

loading
Need help?

Need help?

Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?

This manual is also suitable for:

Micro stc8a8k64d4-64pinMicro stc8a8k64d4-48pin