📄 interrupt.c
字号:
#include "Global.H"
#include "ISD1420.h"
//INT0_InterruptService
//=====================
void INT0_InterruptService(void) interrupt 0 using 1
{
}
//INT1_InterruptService
//=====================
void INT1_InterruptService(void) interrupt 2 using 1
{
}
//Timer0_InterruptService
//=======================
void Timer0_InterruptService(void) interrupt 1 using 1
{
}
//Timer1_InterruptService
//=======================
void Timer1_InterruptService(void) interrupt 3 using 1
{
TH1 = 0xF6;//重置定时
TL1 = 0x00;
Counter_1s++;
/*if(Counter_1s>=380) //接近1S定时时间
{
Counter_1s = 0;
Second_1s++;
} */
if(ISD1420_Counter > 8) //用于后1段空间储存7s时间
{
if(Counter_1s>=2600)
{
Counter_1s = 0;
Record = 1;
Play = 1;
}
}
else
if((ISD1420_Counter>4)&&(ISD1420_Counter<=8) ) //用于后4段空间储存2s时间
{
if(Counter_1s>=780)
{
Counter_1s = 0;
Record = 1;
Play = 1;
}
}
else //用于前5段空间储存1s时间
{
if(Counter_1s>=380)
{
Counter_1s = 0;
Record = 1;
Play = 1;
}
}
DisplayKeyboardControl();
}
//UNINT Counter_1s = 0;//产生1秒信号的计数器
//Timer2_InterruptService
//=======================
void Timer2_InterruptService(void) interrupt 5 using 3
{
}
//SerialPort_InterruptService
//===========================
void SerialPort_InterruptService(void) interrupt 4 using 2
{
if(RI)
{//处理接收缓冲区满中断
RI = 0;//清RI中断标志
}
if(TI)
{//处理发送缓冲区空中断
TI = 0;//清TI中断标志
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -