Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4745

Time limit while waiting for input ?

$
0
0
I'm using a 16F628A to control a DC motor, also using hall effect sensors as limit switches. All working fine however I'm concerned that if one of the hall sensors should fail the motor will keep running, NOT GOOD !

The code waits for a low from the hall sensor, is it possible to have a time limit on how long to wait for that low input and if it doesn't happen, the timer will effectively provide the low and the program can continue just as if the sensor worked ?

For example, the sensor should go low at about 16 seconds, At 18 seconds the timer could provide the low if the sensor didn't. (?)

Thanks for advice !

Viewing all articles
Browse latest Browse all 4745

Trending Articles