Try this
Code:
@ DEVICE INTRC_OSC_NOCLKOUT, WDT_OFF,PWRT_ON,MCLR_OFF
@ DEVICE PROTECT_OFF, CPD_OFF,BOD_OFF
@ DEVICE IESO_OFF, FCMEN_OFF,LVP_OFF
@ DEVICE2 BOR21V, WRT_OFF
DEFINE OSC 4
OSCCON = %01100001
PORTD = 0
TRISD = 0
loop:
PORTD.0 = 1 ' Turn on LED connected to PORTD.0
Pause 500 ' Delay for .5 seconds
PORTD.0 = 0 ' Turn off LED connected to PORTD.0
Pause 500 ' Delay for .5 seconds
Goto loop ' Go back to loop and blink LED forever
End
Also, have a look at this link.
http://www.picbasic.co.uk/forum/showthread.php?t=543
HTH
Bookmarks