While testing out the PIC16F88 replacement for the PIC16F84 on the INSA microcontroller teaching board I ran into issues with two things not working as per the standard sources of examples (e.g. Microchip's Developer Wiki):
- Interrupt Service Routines
- Bit setting, clearing via structures
These examples appear to have been written for versions of XC8 prior to version 2.0. However, since mid-2018, the 2.0 version of the XC8 compiler uses new compiler technology to support both PIC and AVR processors. This is a big change and it's not surprising that the development has broken older examples.
It turns out that we need to rely more on the manual for the XC8 compiler for the time being, as pointed out on the Microchip forum:
In addition to making changes to how ISRs need to be set up so that the compiler understands it, it's important to update how I do bit checking, clearing, setting, toggling. So rather than using structures (the nice way) I'll go back to using tried-and-true manual masking as per this page.
So it's back to using the official documentation for XC8:
- The XC8 (v2) manual for PIC micros
- The XC8 (v2) manual for AVR micros
- The Legacy XC8 user guide (not sure if this applies to v2)
Read the official manual, indeed!