STC8A8K64D4 Series Manual
}
}
void UartInit()
{
SCON = 0x50;
TMOD = 0x00;
TL1 = BRT;
TH1 = BRT >> 8;
TR1 = 1;
AUXR = 0x40;
busy = 0;
}
void UartSend(char dat)
{
while (busy);
busy = 1;
SBUF = dat;
}
void main()
{
P0M0 = 0x00;
P0M1 = 0x00;
P1M0 = 0x00;
P1M1 = 0x00;
P2M0 = 0x00;
P2M1 = 0x00;
P3M0 = 0x00;
P3M1 = 0x00;
P4M0 = 0x00;
P4M1 = 0x00;
P5M0 = 0x00;
P5M1 = 0x00;
F32K = (int idata *)0xf8;
UartInit();
ES = 1;
EA = 1;
UartSend(*F32K >> 8);
UartSend(*F32K);
while (1);
}
Assembly code
;Operating frequency for test is 11.0592MHz
AUXR
DATA
F32K
DATA
BUSY
BIT
P0M1
DATA
P0M0
DATA
P1M1
DATA
P1M0
DATA
P2M1
DATA
8EH
0F8H
20H.0
093H
094H
091H
092H
095H
//Read high byte of 32K frequency
//Read low byte of 32K frequency
-
- 138 -
Need help?
Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?
Questions and answers