semiconductor
Full Member level 4
I’m designing an automatic door using AT89C51 and I’m facing a serious problem that I can’t solve it.
I’m using 2 external interrupt to limit the door. In normal mode, the first limit switch force the interrupt 0 pin to low level and the door is closed. If the sensor detects person coming in, it will open and the the second limit switch is changing its state, interrupt 1 is occurred and the interrupt 1 pin is at low level, the motor is stopped (the interrupt 1 pin is always at low level and only change its state to high when sensor realize that person is out of door (the door is closing)
I intend to config 2 interrupt is falling-edge interrupt driven. But there’s something wrong with this. My program can not start properly! (interrupt 0 / interrupt 1 remain low level after falling-edge occur! Anything wrong with this?
I need you advice to complete my project!!!
Thanks!
I’m using 2 external interrupt to limit the door. In normal mode, the first limit switch force the interrupt 0 pin to low level and the door is closed. If the sensor detects person coming in, it will open and the the second limit switch is changing its state, interrupt 1 is occurred and the interrupt 1 pin is at low level, the motor is stopped (the interrupt 1 pin is always at low level and only change its state to high when sensor realize that person is out of door (the door is closing)
I intend to config 2 interrupt is falling-edge interrupt driven. But there’s something wrong with this. My program can not start properly! (interrupt 0 / interrupt 1 remain low level after falling-edge occur! Anything wrong with this?
I need you advice to complete my project!!!
Thanks!