here's the one who'll work...
Code:
CMCON=7 'disable analog comparator
'Set pin direction
TRISA = %11111111
TRISB = %00000000
'Set pgm vars and cons
SW1 var porta.0
LED var portb.0
'start the program
start:
if SW1 = 1 then
LED =1 'can also use High LED
pause 500 'or whatever delay you want
LED=0 'can also use LOW LED
endif
'or if you want to give LED output the same status as SW1
'you can use the following line
'
'
'while SW1
' LED=1
'wend
'LED=0
'
'
'
'or with IF THEN
'
'If SW1 then LED=1
'IF SW1=0 Then LED=0
'
'Select CASE version
'
'Select Case SW1
' Case 0
' LED=0
' Case 1
' LED=1
'End Select
'
goto start
end
Last edited by mister_e; - 6th December 2004 at 23:48.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks