Using PLL with the Internal Oscillator You have to set OSCCON bits SCS to “00” for the PLL to be able to be used on many PIC18 devices. Do not set to “01”=internal oscillator, instead select the internal oscillator in the CONFIG bits and set it to “00”=primary clock. If you don’t you’ll never see […]
All posts by
XC8 V2.# Compiler
Setting a new project (After following the steps here) Project Properties > XC8 global options > XC8 Compiler > Select ‘Optimizations’ Speed (or disable optimizations?) & Debug checkboxes Set as needed (off and on is good for debugging) Address qualifiers – CAN BE VERY IMPORTANT!!!! If you are using anything that requires locating in specific memory […]
Peripheral Libraries
Newer versions of XC8 want you to use the “MPLAB Code Configurator” when using any peripheral. Using the old peripheral libraries If you don’t want to use the MPLAB Code Configurator you can still get the old peripheral libraries by downloading and installing “PIC18F Legacy Peripheral Libraries v#.#” from the microchip compilers page. Install it […]
Newer XC8 version issues
fatal error: ‘p18f23k22.h’ file not found You no longer include the device specific header file like this: Instead you include this file: This header file is typically included into each C source file you write. It is a generic header file that will include other device- and architecture-specific header files when you build your project. […]
Window zooms when scrolling mouse wheel
We’ve had issues where scrolling the mouse wheel causes the active window to zoom / the font size to change even though ALT isn’t held. The fix: Tools > Options > Keymap > Search for “zoom” For “Zoom Text In” and “Zoom Text Out” select Clear (instead of the default “Alt+MOUSE_WHEEL_UP”/DOWN). Now select edit and […]
Failed to get Device ID
“Failed to get Device ID” in MPLAB 8 after using ICD3 with MPLAB X MPLAB 8 menu > Debugger (or Programmer) > Settings > ConfigurationPress “Manual Download” and select the .jam file (e.g. ICD3FW_012720.jam)from Program Files (x86)/Microchip/MPLAB IDE/ICD3 Hey presto, it should update and then work correctly again.
plib.h: No such file or directory
Compiler message “fatal error: plib.h: No such file or directory” Cause plib.h is no longer shipped with latest version XC32 compiler as of June 2017 (from V1.40). The peripherals “includes” are also no longer shipped. Remedy Go to: https://www.microchip.com/mplab/compilers Downloads tab > Current Peripheral Libraries The Peripheral libraries requires the install of another software package. […]
Code general
b[#]Any component of any type on a page. # = the “id” attribute “send component id” Uncheck to stop the object event being sent out of the UART.
Errors
Compile errors Error: Are there space characters in your line of code? These will cause an error (*sigh*)
Functions on pages
You can add functions to pages by adding touch areas. Add a new function Toolbox > “Hotspot” to add a new touch area. Make it small and put it somewhere not normally touched. For example, say we have added a touch area called “m0”. Trigger the function from an object You can call this from […]