oK HERE IT IS:
loop: High PORTB.0 ' Turn on LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Low PORTB.0 ' Turn off LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Goto loop ' Go back to loop and blink LED forever
End
aslo, I tried this code I found on google and it works fine:
pragma target chip 16f628 -- no 16f818 support yet
pragma target fuses 0x3F22
pragma target clock 20_000_000
pragma target osc hs
include jpic
include jlib
var bit LED is pin_a0
pin_a0_direction = output
asm bsf status, 5
var volatile byte ADCON1 at 0x9F = 0x06 -- disable port a analog functions
asm bcf status, 5
forever loop
LED = low
delay_10ms( 25 )
LED = high
delay_10ms( 25 )
end loop
Bookmarks