Jules_Theone
Member
I'm still a beginner to writing in assembly, but I was just wondering about the __config [hex number] or __config [_CP_OFF & _CPD_OFF & _BOD_OFF] etc. part.
Specifically, why some programs I've seen list each function to turn on or off, and others just a hex number. Basically is there a way to turn my program with __config _CP_OFF & _CPD_OFF & _BOD_OFF etc into a __config 3FFF type one?
Specifically, why some programs I've seen list each function to turn on or off, and others just a hex number. Basically is there a way to turn my program with __config _CP_OFF & _CPD_OFF & _BOD_OFF etc into a __config 3FFF type one?
Code:
list p=16F688 ; list directive to define processor
#include <p16F688.inc> ; processor specific variable definitions
errorlevel -302 ; suppress message 302 from list file
; '__CONFIG' directive is used to embed configuration word within .asm file.
; The lables following the directive are located in the respective .inc file.
; See data sheet for additional information on configuration word settings.
__CONFIG _CP_OFF & _CPD_OFF & _BOD_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _FCMEN_OFF & _IESO_OFF