STC8A8K64D4 Series Manual
MOV
LCALL
SETB
SETB
MOV
MOV
CLR
MOVX
LCALL
INC
CLR
MOVX
LCALL
LOOP:
JMP
END
7.5.8 Read the Frequency of 32K Power-down Wake-up Timer (Read from
Flash)
C language code
//Operating frequency for test is 11.0592MHz
#include "reg51.h"
#include "intrins.h"
#define
FOSC
#define
BRT
sfr
AUXR
sfr
P0M1
sfr
P0M0
sfr
P1M1
sfr
P1M0
sfr
P2M1
sfr
P2M0
sfr
P3M1
sfr
P3M0
sfr
P4M1
sfr
P4M0
sfr
P5M1
sfr
P5M0
bit
busy;
int
*F32K;
void UartIsr() interrupt 4
{
if (TI)
{
TI = 0;
busy = 0;
P5M1, #00H
UART_INIT
ES
EA
P_SW2,#80H
DPTR,# F32K_ADDR
A
A,@DPTR
UART_SEND
DPTR
A
A,@ DPTR
UART_SEND
LOOP
11059200UL
(65536 - FOSC / 115200 / 4)
=
0x8e;
=
0x93;
=
0x94;
=
0x91;
=
0x92;
=
0x95;
=
0x96;
=
0xb1;
=
0xb2;
=
0xb3;
=
0xb4;
=
0xc9;
=
0xca;
; Read high byte of 32K frequency
; Read low byte of 32K frequency
-
- 134 -
Need help?
Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?