51单片机(普中板)函数库

外部中断

Into.c

#include <REGX52.H>

void Into_Init()
{
    IT0 = 1;  //1:下降沿触发;0:低电平触发
    IE0 = 0;
    EX0 = 1;
    EA = 1;
    PX0 = 1;  // 触发优先级
}

/*
void Into_Routine(void) interrupt 0
{
    
}
*/

Into.h

#ifndef __Into_H__
#define __Into_H__


void Into_Init();

#endif

 

posted @ 2023-04-25 12:15  记录——去繁就简  阅读(114)  评论(0)    收藏  举报