News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Compile error 10F222

Started by Marcel_741, Mar 31, 2022, 09:38 AM

Previous topic - Next topic

Marcel_741

Hello,

As I in general program 16Fxxx PIC's, I used the 10F222 for a small project wich did not needs a lot a programming. Just a few action. I wrote the program, start to compile but leeds to a error. The fuse setting related to the internal oscilator was not accepted. I used INTRC_OSC_NOCLKOUT BUT GAVE A ERROR 16.

I did a lot searching on the net/manual, but still no result.

Hope to get some advice,

Thanks in front.

Marcel

top204

#1
Microchip constantly change the fuse names on devices whenever they create newer documentation or data files, but the values stay the same.

At the time of creating the data files for the compiler, the fuse names in the MIcrochip data files used to create the .ppi files were:

Fuse Name Definitions
[CONFIGSTART]
MCLRE_ON EQU 0X0FFF
MCLRE_OFF EQU 0X0FEF
CP_ON EQU 0X0FF7
CP_OFF EQU 0X0FFF
WDT_ON EQU 0X0FFF
WDT_OFF EQU 0X0FFB
MCPU_ON EQU 0X0FFD
MCPU_OFF EQU 0X0FFF
IOFSCS_8MHZ EQU 0X0FFF
IOFSCS_4MHZ EQU 0X0FFE
IOSCFS_8MHZ EQU 0X0FFF
IOSCFS_4MHZ EQU 0X0FFE
[CONFIGEND]


These can be found near the end of the device's .ppi file. Located at: "C:\Program Files (x86)\ProtonIDE\PDS\Includes\PPI\P10F222.PPI"

Marcel_741

Thanks for this...

I copied the 'IOFSCS_4MHZ' to the config and the compile action was succesfull.

I can continu to the next step.

Regards,

Marcel

Stephen Moss

As Les indicated, Microchip subsequently renamed some of their configuration fuses so on older devices that can lead to difference between those entered manually from the data sheet or by using the fuse configurator and those the compiler expected from PPI files written before the change.

If you are using the fuse configurator plugin with the Mechanique IDE or built in to Positron Studio then setting the output to Assembler will get around the problem as it writes the relevant value to the appropriate register, and so by not using the Fuse names there is no error due to them using different fuse names.
It is a matter of personal choice but I prefer using the fuse configurator Assembler output over altering the PPI files. The reason being that if at some point your modified PPI file is overwritten and you later return the program you may then be confused as to why it no longer compiles when it did previously. Therefore whether you use the configurators assembler output or alter the PPI file you should make a note in your code to remind you of the fuse name issue and how to resolved it previously.