I can try. No timer use
Code:
DEFINE OSC 4
CMCON = 7
ADCON1 = 7
output PORTB.0
input PORTA.4
b0 var word
b0 = 0
HIGH PORTB.0
pause 200
main: if PORTA.4 = 1 then enter
goto main
enter: if porta.4 = 1 then enter
tmecnt: if PORTA.4 = 1 then extime
b0 = b0+1
pause 100 ' Least count of time 100 ms
goto tmecnt
extime: if PORTA.4 = 1 then extime
ledon: b0 = b0 * 100
LOW PORTB.0
pause b0
HIGH PORTB.0
b0 = 0
goto main
end
If code works, can i give my PayPal................ hehe
Last edited by NF9Ω; - 12th September 2007 at 09:41.
Reason: led state change
Thought-habits can harden into character. So watch your thoughts.
(__)
Bookmarks