Download Print this page

STC micro STC8A8K64D4 Series Reference Manual page 263

Advertisement

STC8A8K64D4 Series Manual
sfr
P0M0
sfr
P1M1
sfr
P1M0
sfr
P2M1
sfr
P2M0
sfr
P3M1
sfr
P3M0
sfr
P4M1
sfr
P4M0
sfr
P5M1
sfr
P5M0
sbit
P12
sbit
P13
void UART3_Isr() interrupt 17
{
if (S3CON & 0x02)
{
S3CON &= ~0x02;
P12 = !P12;
}
if (S3CON & 0x01)
{
S3CON &= ~0x01;
P13 = !P13;
}
}
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;
S3CON = 0x10;
T2L = 0xe8;
T2H = 0xff;
AUXR = 0x14;
IE2 = ES3;
EA = 1;
S3BUF = 0x5a;
while (1);
}
Assembly code
;Operating frequency for test is 11.0592MHz
T2L
DATA
T2H
DATA
=
0x94;
=
0x91;
=
0x92;
=
0x95;
=
0x96;
=
0xb1;
=
0xb2;
=
0xb3;
=
0xb4;
=
0xc9;
=
0xca;
=
P1^2;
=
P1^3;
0D7H
0D6H
//Clear interrupt flag
//Test port
//Clear interrupt flag
//Test port
//65536-11059200/115200/4=0FFE8H
//Start timer
//Enable UART3 interrupt
//Send test data
-
- 247 -

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