
Originally Posted by
languer
So from the code and your statement it looks like either the first "if startbutton = 1 then goto checkvalues" is reading incorrectly; or perhaps the first "flashingled = 0" is not being executed.
Your initial settings look fine. You can remove the ADCON1 as this chip does not have this. I would perhaps have the order different (i.e. @device first), but I do not think it should make a difference.
How is the "startbutton" input connected? Is it sharing anything with the solenoid?
How is the "flashingled" connected?
the button is such that a wire leads from +5v to the switch, then from the switch to the pin and to a resistor to ground.
The LED's are outputs from the pic that have a current limiting resistor of 1000 ohms.
If you disconnect the solenoid output, does the code runs as expected?
Bookmarks