Hi,
Just look at the .INFO file, it has a "section" for each CONFIG you can possibly set for the device, choose one from each section if you don't know the default, like:
That way you don't have to know which bit belongs to which register.Code:; This is for the 18F26K20 #CONFIG CONFIG FOSC = HSPLL CONFIG FCMEM = ON CONFIG IESO = OFF CONFIG PWRT = ON CONFIG BOREN = OFF ; And so on #ENDCONFIG
Otherwise you have to resort to the datasheet and/or the .inc file for the device located in the MPASM directory, at the bottom of that file you'll find which bit goes where, like:And so on but again, I prefer the new way posted above.Code:;----- CONFIG1H Options -------------------------------------------------- _FOSC_LP_1H EQU H'F0' ; LP oscillator _FOSC_XT_1H EQU H'F1' ; XT oscillator _FOSC_HS_1H EQU H'F2' ; HS oscillator _FOSC_RC_1H EQU H'F3' ; External RC oscillator, CLKOUT function on RA6 _FOSC_EC_1H EQU H'F4' ; EC oscillator, CLKOUT function on RA6 _FOSC_ECIO6_1H EQU H'F5' ; EC oscillator, port function on RA6 _FOSC_HSPLL_1H EQU H'F6' ; HS oscillator, PLL enabled (Clock Frequency = 4 x FOSC1) _FOSC_RCIO6_1H EQU H'F7' ; External RC oscillator, port function on RA6 _FOSC_INTIO67_1H EQU H'F8' ; Internal oscillator block, port function on RA6 and RA7 _FOSC_INTIO7_1H EQU H'F9' ; Internal oscillator block, CLKOUT function on RA6, port function on RA7 _FCMEN_OFF_1H EQU H'BF' ; Fail-Safe Clock Monitor disabled _FCMEN_ON_1H EQU H'FF' ; Fail-Safe Clock Monitor enabled _IESO_OFF_1H EQU H'7F' ; Oscillator Switchover mode disabled _IESO_ON_1H EQU H'FF' ; Oscillator Switchover mode enabled ;----- CONFIG2L Options -------------------------------------------------- _PWRT_ON_2L EQU H'FE' ; PWRT enabled _PWRT_OFF_2L EQU H'FF' ; PWRT disabled _BOREN_OFF_2L EQU H'F9' ; Brown-out Reset disabled in hardware and software _BOREN_ON_2L EQU H'FB' ; Brown-out Reset enabled and controlled by software (SBOREN is enabled) _BOREN_NOSLP_2L EQU H'FD' ; Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled) _BOREN_SBORDIS_2L EQU H'FF' ; Brown-out Reset enabled in hardware only (SBOREN is disabled) _BORV_30_2L EQU H'E7' ; VBOR set to 3.0 V nominal _BORV_27_2L EQU H'EF' ; VBOR set to 2.7 V nominal _BORV_22_2L EQU H'F7' ; VBOR set to 2.2 V nominal _BORV_18_2L EQU H'FF' ; VBOR set to 1.8 V nominal
/Henrik.




Bookmarks