STC單片機(jī)IO管腳毀壞動(dòng)態(tài)自檢程序
#i nclude
#i nclude
#i nclude
#i nclude
#pragma NOAREGS
//STC ISP_V2.0 PCB的晶振為18.432MHz
#define WdtTime_71_1mS
#define WdtTime_141_2mS
#define WdtTime_284_4mS
#define WdtTime_568_8mS
#define WdtTime_1_1377S
#define WdtTime_2_755S
#define T2_5mS -1536*5//5ms 18.432MHz
sfr
sfr
sfr16 TIMEER2
sfr16 RCAP
sfr
//全局變量定義
typedef struct Systemstruct{//系統(tǒng)數(shù)據(jù)結(jié)構(gòu)
//
}SystemData;
data SystemData SystemBuffers;//申請(qǐng)系統(tǒng)數(shù)據(jù)結(jié)構(gòu)
void MainInit(void);//系統(tǒng)初始化
void SystemInit(void);//系統(tǒng)初始化
void SystemSetup(void);//系統(tǒng)設(shè)置
void SystemIoInit(void);//系統(tǒng)接口初始化
void TimeInit(void);//定時(shí)器定時(shí)參數(shù)設(shè)置
void UserSetup(void);//用戶運(yùn)行環(huán)境設(shè)置
void ClrWdt(void);//喂狗
void IoPinTest(void);
unsigned char Port0Test(void);
unsigned char Port1Test(void);
unsigned char Port2Test(void);
unsigned char Port3Test(void);
void main(void)
{
}
void MainInit(void) using 0//系統(tǒng)初始化
{
}
void SystemInit(void) using 0//系統(tǒng)初始化
{
}
void SystemSetup(void) using 0//系統(tǒng)設(shè)置
{
}
void SystemIoInit(void) using 0
{
}
void TimeInit() using 0
{
//
}
void UserSetup(void) using 0//用戶運(yùn)行環(huán)境設(shè)置
{
}
void ClrWdt(void)
{
}
unsigned char Port0Test(void)
{
unsigned char testval;
}
unsigned char Port1Test(void)
{
unsigned char testval;
}
unsigned char Port2Test(void)
{
unsigned char testval;
}
unsigned char Port3Test(void)
{
unsigned char testval;
}
void IoPinTest(void)
{
unsigned char i, err = 0, pin = 0;
//
}
void t0proc() interrupt TF0_VECTOR using 1
{
}
void t1proc() interrupt TF1_VECTOR using 1
{
}
void t2proc() interrupt TF2_VECTOR using 0
{
}
void sioproc() interrupt SIO_VECTOR using 1
{
//unsigned char i;
}
void int0proc() interrupt IE0_VECTOR using 0
{
}
void int1proc() interrupt IE1_VECTOR using 0
{
}
評(píng)論