Raady Here
Full Member level 5
- Joined
- Jun 8, 2013
- Messages
- 242
- Helped
- 26
- Reputation
- 52
- Reaction score
- 26
- Trophy points
- 28
- Location
- India
- Activity points
- 1,571
Hi,
I have configured a port pin which is connected to press button(switch), if high which I will start a motor.And for this I simply applied a condition
if (PORTB.RB6){
// loops for running motors.
}.
But I need to make avoidance of any accidental press. For this I need to hold the button for 3 seconds then motor should start.
How do I check if it is hold on press for 3 seconds or not ? Should I configure any timer for this ?
Any suggestions please.
MPLAB v8.8 / dsPIC30F5011.
Regards,
Raady.
I have configured a port pin which is connected to press button(switch), if high which I will start a motor.And for this I simply applied a condition
if (PORTB.RB6){
// loops for running motors.
}.
But I need to make avoidance of any accidental press. For this I need to hold the button for 3 seconds then motor should start.
How do I check if it is hold on press for 3 seconds or not ? Should I configure any timer for this ?
Any suggestions please.
MPLAB v8.8 / dsPIC30F5011.
Regards,
Raady.