If your 'switch' is actually a momentary button then porta.3 is O.K. The MCLR button will produce a momentary low, so change the conditional statement, and debounce as required:
Start:
if porta.3 off then
wait 10 ms
If porta.3 on then goto start
flash
end if
....
....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I compile it I get a sytax error, and a syslcdtemp.0 is not a vaild i/o pin or port error for every line that has the "
if porta.3 on then flash" statement,
try to compile the code i posted in my first post and see
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
here is the piece that gives me lots of errors:
#chip 16F685, 4 'mhz
#config OSC=INTOSC, MCLRE=off, WDT=off
'Set the pin directions
dir porta.3 in 'switch
dir portc.3 out ' RED
'Main routine
Start:
if porta.3 on then flash
goto start
sub flash
set portc.3 on ' RED
wait 250 ms
set portc.3 off ' RED
end sub
If your 'switch' is actually a momentary button then porta.3 is O.K. The MCLR button will produce a momentary low, so change the conditional statement, and debounce as required:
Start:
if porta.3 off then
wait 10 ms
If porta.3 on then goto start
flash
end if
....
....
When I compile it I get a sytax error, and a syslcdtemp.0 is not a vaild i/o pin or port error for every line that has the "
if porta.3 on then flash" statement,
try to compile the code i posted in my first post and see
Now that my eyes are open, its the sub 'flash' that needs to be changed to a different name (it's being used by the lowlevel lcd.h file).
that did it, thanks