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?
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.
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.