STC8A8K64D4 Series Manual
;
MOV
;
; Select 40MHz
;
MOV
;
MOV
;
MOV
;
MOVX
;
MOV
;
CLR
;
MOVX
;
MOV
;
MOV
;
CLR
;
MOVX
;
MOV
;
MOV
;
MOV
;
MOV
;
MOVX
;
MOV
;
; Select 45MHz
;
MOV
;
MOV
;
MOV
;
MOVX
;
MOV
;
CLR
;
MOVX
;
MOV
;
MOV
;
CLR
;
MOVX
;
MOV
;
MOV
;
MOV
;
MOV
;
MOVX
;
MOV
;$ENDIF
JMP
END
7.5.11 Read the User-defined internal IRC Frequency (Read from Flash)
C language code
//Operating frequency for test is 11.0592MHz
#include "reg51.h"
#include "intrins.h"
#define
CKSEL
#define
CLKDIV
// The following table is the parameter list of STC8A8K60S4
#define
ID_ROMADDR
#define
VREF_ROMADDR
P_SW2,#00H
P_SW2,#80H
A,#4
DPTR,#CLKDIV
@DPTR,A
DPTR,#T40M_ADDR
A
A,@DPTR
IRTRIM,A
DPTR,#VRT44M_ADDR
A
A,@DPTR
VRTRIM,A
IRCBAND,#03H
A,#0
DPTR,#CLKDIV
@DPTR,A
P_SW2,#00H
P_SW2,#80H
A,#4
DPTR,#CLKDIV
@DPTR,A
DPTR,#T45M_ADDR
A
A,@DPTR
IRTRIM,A
DPTR,#VRT44M_ADDR
A
A,@DPTR
VRTRIM,A
IRCBAND,#03H
A,#0
DPTR,#CLKDIV
@DPTR,A
P_SW2,#00H
$
(*(unsigned char volatile xdata *)0xfe00)
(*(unsigned char volatile xdata *)0xfe01)
((unsigned char code *)0xeff9)
(*(unsigned int code *)0xeff7)
-
- 146 -
Need help?
Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?
Questions and answers