Hi All,
I am running into a frustrating problem using the PIC 12F683. What I need to do is monitor a pin for 5 volts or ground. When the pin is ground, an output pin is low, and when the pin is high, wait for 5 seconds and then turn the output pin high.
I thought it would be simple to adapt the BUTX4.PBP sample program from the ME Labs website and just insert a PAUSE 5000 statement between the
PB=0 and Low LED statements.
However this causes the LED to never come on whether the pushbutton is pushed or not.
I am completely at a loss!
Here is the code snippet that works:
IF PB = 0 Then
LOW LED
Here is the code snippet that doesn't:
IF PB = 0 Then
PAUSE 5000
LOW LED
Any help would be appreciated!
Regards,
mikejp56
I am running into a frustrating problem using the PIC 12F683. What I need to do is monitor a pin for 5 volts or ground. When the pin is ground, an output pin is low, and when the pin is high, wait for 5 seconds and then turn the output pin high.
I thought it would be simple to adapt the BUTX4.PBP sample program from the ME Labs website and just insert a PAUSE 5000 statement between the
PB=0 and Low LED statements.
However this causes the LED to never come on whether the pushbutton is pushed or not.
I am completely at a loss!
Here is the code snippet that works:
IF PB = 0 Then
LOW LED
Here is the code snippet that doesn't:
IF PB = 0 Then
PAUSE 5000
LOW LED
Any help would be appreciated!
Regards,
mikejp56