📄 int.c
字号:
#include "prj.h"
#include <intrins.h>
// ************ t0 定时器中断 ******************
bit timer0b;
void intt0(void) small interrupt 1
{
TL0=0x4c;
TH0=0x00;
timer0b = 1;
}
void timer0()
{
if(_testbit_(timer0b))
{
}
}
/*
// ************ 外部中断零 ************
void intx0(void) small interrupt 0
{
TL0=0;
TH0=0;
}
// ************ 外部中断一 ************
void intx1(void) small interrupt 2 using 2
{
TL0=0;
TH0=0;
}
*/
// ************ 串行口中断 ************
/*
void ints(void) small interrupt 4 using 1
{
byte val;
if(RI)
{
RI=0;val=SBUF;
show.buf[show.indexs+4]=val;
show.indexs++;
if(show.indexs>3)show.indexs=0;
SBUF=~val;
}
else
{
TI=0;
}
}
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -