Page 1 of 1

mpasm unable to modify CONFIG settings for 18F2xK50/4xK50

Posted: Fri Aug 23, 2019 9:33 am
by Jerry Messina
This isn't really a compiler issue... it's a problem with mpasm.

The MPASM/MPASMX assembler (all versions, up to mpasmx 5.85) does not correctly identify the nLPBOR and nPWRTEN
config settings in CONFIG2L, and will leave them at the default setting.

This appears to be a problem with the way these two settings are defined in the mpasm 8bit_device.info database.
For the 18F2xK50/18F4xK50, the above two config fuses are defined as:

Code: Select all

   <SWITCH_INFO_TYPE><nPWRTEN><Power-up Timer Enable><1><2>
   <SWITCH_INFO_TYPE><nLPBOR><Low-Power Brown-out Reset><40><2>
Note the use of lowercase chars in the SWITCH_INFO_TYPE name (ie 'nPWRTEN')

To correct this, you can edit the 8bit_device.info file with a text editor (notepad.exe) and change those names to uppercase...

Code: Select all

   <SWITCH_INFO_TYPE><NPWRTEN><Power-up Timer Enable><1><2>
   <SWITCH_INFO_TYPE><NLPBOR><Low-Power Brown-out Reset><40><2>
Be careful not to change/add anything else. As always, make a backup copy first.

Re: mpasm unable to modify CONFIG settings for 18F2xK50/4xK5

Posted: Fri Aug 23, 2019 2:30 pm
by David Barker
Thanks for that info Jerry...