Quote Originally Posted by polymer52 View Post
I'm confused about the config or fuses or whatever they are.
I too had problems assimilating how to best define the config settings in my code when I was new to PicBasic. Of the many suggestions I received from members of this forum, the one that stuck with me as the best way is as shown in the following example, where the config settings are part of an assembly list of statements. By going to the data sheet for the PIC you are using, you can find how to define these statements...these in this example are for an 18F4550, including alternative methods using @ config or
@ _config statements:
Code:
;--- if you un-comment these, you must comment the ones in the .inc file--
ASM ; 18F2550/4550, 8mhz crystal
   __CONFIG    _CONFIG1L, _PLLDIV_2_1L & _CPUDIV_OSC4_PLL6_1L & _USBDIV_2_1L
   __CONFIG    _CONFIG1H, _FOSC_HSPLL_HS_1H
   __CONFIG    _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _VREGEN_ON_2L
   __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
   __CONFIG    _CONFIG3H, _PBADEN_OFF_3H ; PortB resets as digital
   __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
ENDASM
' If 16F877 MCU used, use this config
'@ config XT_osc, wdt_off, pwrt_on, protect_off
'                  or
'@ _CONFIG _CONFIG1H,_OSCS_OFF_1H & _HS_OSC_1H