int.c
来自「51单片机读写卡的程序」· C语言 代码 · 共 84 行
C
84 行
#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 + =
减小字号Ctrl + -
显示快捷键?