semiconductor
Full Member level 4
timeout in 89C51/89C52
I'm assigned an exercise to program an AT89C51 for automatic door project.
I'm facing a problem: TIMEOUT
if the outer sensor detects people available, it will open the door and waiting the inner sensor detects people available. After 20s, if no signal is detected, it automatically close the door and return to the beginning of the program (waiting for signal from outer door.
with AT89C51, I'm programming in C but I don't know how to design TIMEOUT algorithm with AT89C51 (20 seconds).
Can someone recommend me solutions?
I'm assigned an exercise to program an AT89C51 for automatic door project.
I'm facing a problem: TIMEOUT
if the outer sensor detects people available, it will open the door and waiting the inner sensor detects people available. After 20s, if no signal is detected, it automatically close the door and return to the beginning of the program (waiting for signal from outer door.
with AT89C51, I'm programming in C but I don't know how to design TIMEOUT algorithm with AT89C51 (20 seconds).
Can someone recommend me solutions?