Saturday, October 02, 2004

code for PIC

main:

if portc.3 = 0 then
high porta.0
pause 10000
low porta.0
endif
goto main

this looks for an open switch and then turns pin A0 HIGH for 10,000 milliseconds. While the pin is HIGH the relay is closed and current flows for 10 seconds.

0 Comments:

Post a Comment

<< Home