STC8A8K64D4 Series Manual
while (1);
}
//Because the interrupt vector is greater than 31, it cannot be directly compiled in KEIL
//The 13th interrupt entry address must be borrowed
void common_isr() interrupt 13
{
unsigned char psw2_st;
unsigned char intf;
psw2_st = P_SW2;
P_SW2 |= 0x80;
intf = P1INTF;
if (intf)
{
P1INTF = 0x00;
if (intf & 0x01)
{
//P1.0 interrupt
}
if (intf & 0x02)
{
//P1.1 interrupt
}
if (intf & 0x04)
{
//P1.2 interrupt
}
if (intf & 0x08)
{
//P1.3 interrupt
}
if (intf & 0x10)
{
//P1.4 interrupt
}
if (intf & 0x20)
{
//P1.5 interrupt
}
if (intf & 0x40)
{
//P1.6 interrupt
}
if (intf & 0x80)
{
//P1.7 interrupt
}
}
P_SW2 = psw2_st;
}
// ISR.ASM
// Save the following code as ISP.ASM, and then add the file to the project
CSEG AT 0133H ;P1 interrupt entry address
JMP P1INT_ISR