Welcome.
First off, do not
PBP will do all of that. All you need to do is select the proper PIC from the dropdown box on the toolbar.I put 'LIST P=16F506' (no, not the single-quotes too) at the top and it bombs out with that as the first syntax error in BLINK.BAS.
Then it moves on to my next line - INCLUDE "P16F506.INC" (or M16F506.INC) -
If you want to set the fuses in code space then the *.inc for the chip in the PBP directory needs to have a line or two commented out.
http://www.picbasic.co.uk/forum/showthread.php?t=543
A basic program should look something like this
Code:@ __config _HS_OSC & _WDT_OFF & _LVP_OFF & _CP_OFF DEFINE OSC 4 CNT VAR BYTE START: FOR CNT = 0 TO 10 HIGH PORTC.1 LOW PORTC.0 PAUSE 250 LOW PORTC.1 HIGH PORTC.0 PAUSE 250 NEXT CNT FOR CNT = 0 TO 100 PORTC = %11 PAUSE CNT PORTC = %00 PAUSE CNT NEXT CNT GOTO START





Bookmarks