求89C51单片机外部中断程序,C语言编写。
求89C51单片机外部中断程序,C语言编写。
日期:2017-09-27 12:07:49 人气:1
方法类似,补写程序如下:
#include
#define uint unsigned int
#define uchar unsigned char
sbit LED=P0^0;
sbit LED1=P0^1;
void delay1ms (uint z)
{
uint x,y;
for (x=z;x>0;x--)
for (y=110;y>0;y--);
}
void exter() interrupt 2
{
delay1ms(6