Pic16F88 ASM mode doesn't accept any __config value

tiscando

Senior Member
Hi there,
When programming in assembler code in PE set to PIC16F88, the __config directive doesn't seem to accept any configuration value, including the defaults and including b'1111111111111111'. I have made a custom p16f88.inc file as correctly as I could, and I re-checked the config section and it is correct with the datasheet.

It always reports "Error[126] : Argument out of range (not a valid config register address)" on the __config line.
The config works ok with a PIC12F683 and other assembler programs.

My workaround is to have no __config directive in the assembler program, compile it to HEX without programming it onto the PIC, then I set the configuration settings manually in the PIC programmer which I then program the PIC with. I have no other errors or problems and my last PIC16F88 assembler program (basically testing bitbang serial output) works as intended.
 

hippy

Ex-Staff (retired)
This appears to be an error generated by MPASMWIN which is produced by Microchip which we have no control over.
 

Technical

Technical Support
Staff member
This is because you are not using the command correctly. On devices like the 88 which have more than one config word you will need something like this:

__CONFIG _CONFIG1, _CP_OFF & _WDT_ON & _INTRC_IO & etc...
__CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF
 

Technical

Technical Support
Staff member
When you write assembler code it is not compiled by the Programming Editor, it is compiled by the Microchip compiler MPASM. So if it does not compile you are simply making a syntax error. Look in the MPASM help files for more details about correct assembler directive syntax, we do not provide assembler code support via these PICAXE forums, there are plenty of other assembler code forums around including Microchip's own.
 

tiscando

Senior Member
When you write assembler code it is not compiled by the Programming Editor, it is compiled by the Microchip compiler MPASM. So if it does not compile you are simply making a syntax error. Look in the MPASM help files for more details about correct assembler directive syntax, we do not provide assembler code support via these PICAXE forums, there are plenty of other assembler code forums around including Microchip's own.
Thanks Technical.
 
Top