I'm setting B.1 low with a 5k resistor to gnd. and high with wire inserted into breadboard.I'm sure the wire is far worse than a button. I had just tried this:
i Var Byte
Loop:
If PortB.1=1 Then
High PortB.0
for i=1 to 60
Pause 1000
next
Low PortB.0
EndIf
DoNothing:
If PortB.1=1 Then
Goto DoNothing
EndiF
low 0 }I added this
pause 500 } "
if portb.0=0 then} "
Goto Loop
endif
I'm sure you're right about the "bounce" as this fixed the problem.
I'll try your code instead though.
The high to B.1 will actually come from an optoisolator in the final stage. I've got alot more code to figure out on this project and if you or anyone can recomend a book that would help,please do.
Thanks,
Sam
NavMicroSystems,I just sent you a PM.
Bookmarks