微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > STC单片机IO管脚毁坏动态自检程序

STC单片机IO管脚毁坏动态自检程序

时间:11-23 来源:互联网 点击:
interrupt TF0_VECTOR using 1
{
}

void t1proc() interrupt TF1_VECTOR using 1
{
}

void t2proc() interrupt TF2_VECTOR using 0
{
TF2 = 0;
if (PCON & GF0_) {//中断是从主循环内跳入的才能喂狗
ClrWdt();//清除看门狗计数器
PCON &= ~GF0_;//清除标志
}
IoPinTest();
}

void sioproc() interrupt SIO_VECTOR using 1
{
//unsigned char i;
if (RI) {//接收中断
RI = 0;
}
if (TI) {//发送中断
TI = 0;
if (SystemBuffers.SioTxCount) {//允许串口发送数据
SBUF = SystemBuffers.SioTxBuff[SystemBuffers.SioTxSum - SystemBuffers.SioTxCount];//串口显示
SystemBuffers.SioTxCount --;
}
}
}

void int0proc() interrupt IE0_VECTOR using 0
{
}

void int1proc() interrupt IE1_VECTOR using 0
{
}

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top