/* --- STC12C5axx Series MCU Ext1(Falling edge) Demo ---------------*/ #include "reg51.h" //External interrupt1 service routine void exint1() interrupt 2 //(location at 0013H) { } void main() { IT1 = 1; //set INT1 int type (1:Falling only 0:Low level) EX1 = 1; //enable INT1 interrupt EA = 1; //open global interrupt switch while (1); }