int.c
来自「用51单片机实现的在屏幕上显视文字,外接一颗MT230OSDIC」· C语言 代码 · 共 56 行
C
56 行
#include "golbal.h"
/*--------------------------------;
; Int1
;---------------------------------*/
void inten_int1(void) interrupt 2 using 2
{
EA=0;
if( ( byM230_IIC_INTFLG&0x40 ) !=0 ) // Received data
{
if (byM230_IIC_TXRCBBUF == 0x1f) // 77 is enter ISP mode command code
{
IE=0;
byM230_WDT=0;
byM230_ISPSLV=0x7c;
byM230_ISPEN=0x93;
PCON=1;
}
}
EA=1;
}
/*-----------------------------------;
; Timer0 interrupt
;------------------------------------*/
void Timer0(void) interrupt 1 using 1
{
#ifdef OSC12M
TH0 = HiByte(65536-TIME_BASE1*1000); //set next interrupt time TIME_BASE1 ms
TL0 = LoByte(65536-TIME_BASE1*1000);
#else
#ifdef OSC24M
TH0 = HiByte(65536-TIME_BASE1*2000); //set next interrupt time TIME_BASE1 ms
TL0 = LoByte(65536-TIME_BASE1*2000);
#else
//not define osc12m or osc24m
#endif
#endif
/*
if(IICWait)
{
IICWait--;
}
*/
if(DelayCount)
{
DelayCount--;
}
if(KeyTime)
KeyTime--;
return;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?