Hi All,
Up till now I have used the Configure>Configuration Bits to set up the PIC, and have used some of the Config directives in the smaller (8/16 pin) devices.
I'm trying to use the assembler config directive to setup the config bits for a PIC16F886 chip, but altough the assembler reports no errors, I don't think that the configuration bits are getting set correctly as not all chips are setting the config bits, and I have to revert to the Configure>Configuration Bits method to get a reliable device.
This is the syntax I am using .... where am I going wrong please.
__CONFIG1 = _INTRC_OSC_NOCLKOUT
__CONFIG1 = _WDT_OFF
etc.
I suspect that the assembler is seeing the __CONFIG1 as a label, rather than an assembler directive ....
[I]; '__CONFIG' directive is used to embed configuration data within .asm file.
; The labels following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configuration word.
[SIZE=2] __CONFIG _CONFIG1, _LVP_OFF & _FCMEN_ON & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
__CONFIG _CONFIG2, _WRT_OFF & _BOR21V[/SIZE][/I]
you may study the template file at C:\Program Files\Microchip\MPASM Suite\Template\Code and lookk for the chip 16F886temp.asm