Introduction - If you have any usage issues, please Google them yourself
STC15 series microcontroller external interrupt 0 (INT0) and external interrupt 1 (INT1) trigger in two ways, the rising and falling sides can trigger mode and only the falling edge trigger mode. In practical applications, sometimes the rising edge is required to trigger. There are two possible solutions.
1. set the trigger mode to only the falling edge trigger. When an external circuit produces a rising edge, a transistor is added to the reverse direction by means of a hardware circuit.
2., this method does not need to change the hardware circuit. The trigger mode is set to the rising edge and the falling edge. When an external interrupt generates an ascending edge, it enters the interrupt service function, and then performs further processing in the interrupt service function to detect the level status of the current INT0. If it is high, it is judged to be the rising edge. If it is low, it is judged to be the falling edge.