Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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,
mplab1.png


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

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:
1697913050507.png

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
    1697912091571.png
    8.6 KB · Views: 64

Latest threads

New Articles From Microcontroller Tips

Back
Top