Is MCC (code Configurator) wrong?

Pommie

Well-Known Member
Most Helpful Member
I'm doing a project using the Pic18F23K22 and used the Code Configurator to setp things.
It generated this,


Using ANSEL and ANSELH.
However, the 23K22 doesn't have these registers as shown in the datasheet,

I haven't compiled yet as I've still lots to do but just wondering is this a bug?

Thanks,

Mike.
 
Just tryed to compile and I'm getting lots of
"Unknown configuation setting" errors.
I think the code configurator had the wrong pic chip.
Will try a new project from scratch to see what it does.

Mike.
 
Seems to have work correctly now, not sure what the problem was.
I've just installed MPLAB X on Linux so that could have something to do with it.

Mike.
 
I have found differences between datasheets, the .inc files, and the Assembler. My results are from MPLab 8,92. As shown below for your chip:

That old .inc file does show ANSELA as 5 bits.

I had a similar problem with an inconsistency between the .inc file and what the Assembler thought was present for the PIC16F1789. It was misnamed and was solved by adding a define for the affected SPI register. In my case, without that define, the Assembler errored.

I assume a lot of Microchip's files for various related chips are generated by copy/paste and whoever did it for the 16F1789 didn't realize the 16F1789 only has one hardware SPI.

John
 

Attachments

  • 1697912091571.png
    8.6 KB · Views: 69
I also once struggled for ages, until I found out the INC file was incorrect for the specific device I was using.
 
I have found that if you have multiple projects issues can manifest. You didn't 'per chance' upgrade to the K22 from the the old std 22?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…