How to read / understand the config file P16fxxx.inc
After using a time PM as the assembler of PBP I switched over to mpasmwin, but now I get errors direct in the first line of my programm.
I use the pic 16F882.
I looked in the P16F88x.inc file to see how to setup the configword(s) in my programm.
@ __CONFIG _HS_OSC
was the first I tried and te result was an error [126].
The question is what do I forget when using this processor??
Thanks in advance.
CONFIG settings for 16F690
jmj882, I don't have the settings for the 16Fxxx MCUs you mention, but here is what I use for the 16F690. These should be very close to the CONFIGs for your listed chips. Notice the IF..ELSE structure of this assembly code that you can paste into a .pbp program will work with either the PM or MPASM assemblers.
Code:
' -----[ Device Declaration ]---------------------------------------------
ASM ; 16F690
ifdef PM_USED ; For PM assembler
device INTRC_OSC_NOCLKOUT ; Oscillator Selection
device FCMEN_OFF ; Fail-Safe Clock Monitor
device IESO_OFF ; Internal External Switchover
device BOD_OFF ; Brown-out Detect
; device BOR_SBODEN ; SBODEN Brown-out setting
device CPD_OFF ; Data Code Protection
device PROTECT_OFF ; Code Protection
device MCLR_OFF ; Master Clear Reset
device PWRT_OFF ; Power-up Timer
device WDT_OFF ; Watchdog Timer
else ; For MPASM assembler
cfg= _INTRC_OSC_NOCLKOUT ; Oscillator Selection
cfg=cfg& _FCMEN_OFF ; Fail-Safe Clock Monitor
cfg=cfg& _IESO_OFF ; Internal External Switchover
cfg=cfg& _BOR_OFF ; Brown-out Reset
cfg=cfg& _CPD_OFF ; Data Code Protection
cfg=cfg& _CP_OFF ; Code Protection
cfg=cfg& _MCLRE_OFF ; Master Clear Reset
cfg=cfg& _PWRTE_OFF ; Power-up Timer
cfg=cfg& _WDT_OFF ; Watchdog Timer
__CONFIG cfg
endif
ENDASM