Example usage How we define it for use in our libraries
All posts by
TMR (using MCC)
TMR0 – IRQ This example modifies TMR0 in the IRQ to obtain a roll over every 1mS. You could use a timer with a prescaller for this, but in this example we show how it’s possible on TMR0 with no prescaller (leaving your prescaller timers available for other uses) Using your own irq function
I2C (using MCC)
I2C Address Set as right shifted byte address (excluding RW at bit 0).So 0b01101000 is set as (0x68 >> 1), not 0x68. We always specify I2C addresses as the normal byte address, so we would use (0x68 >> 1) when setting the address to be used. Example usage (without interrupts) How we use in our […]
Calculated clock frequencies don’t update
In the main MCC ProjectGraph view, from the plugins dropdown select “Clock Configuration”. This seems to solve it whereas setting the config bits directly doesn’t.
No rule to make target
Deleting files in XC8 then gets you “No rule to make target” errors when building Project properties > File Inclusion/Exclusion Are the files still showing in the “Included Files” box? If so remove them
PIC16 Sleep
ADC (using MCC)
ADC Settings FRC Does your uC have a FRC to use as the clock source? Nice and simple if it does. FVR Does your uC have a FVR to use as the reference voltage? Useful if you want an accurate reference, but not useful it you want your analog readings referenced to the uC power […]
PIC32 Docs
PIC32 Family Reference Manual
Debugging issues with PIC32
Peripheral won’t work / altering its SFR doesn’t work Check your Peripheral Module Disable Bits (PMDx) you’ve probably got the peripheral disabled!
Files
Selectively including files in project build configurations See here.