Category: Microchip

While the float versions of this function work wonderfully on PCs, the  PIC12F, not so much. Without a math coprocessor or FPU, additional libraries are loaded to handle the floats. This function is a port of the float function which …

HSL To RGB for PIC Microcontrollers – and others Read More »

Tagged with: , , , , , , , ,

The Pros: It’s color and it looks good even at steep angles. Getting a simple Hello, World app running is trivial. It’s engine is a PIC18F26K20! Oh, the price is pretty darn good. Buy 500 units (~$1000) and they’ll tweak …

Digole 2.6 Serial DS320240CIPS-66T SPI LCD Display Library for the PIC18F2550 XC8 Read More »

Tagged with: , , , , , , , , , , ,

OK, this is for the PIC18F2550. It should work for most, if not all of the PIC18’s, with a few minor changes – Like the TRIS outputs. It will not work with the PIC16’s. It will not work with the …

Pulse Width Modulation on a PIC18F2550 – PWM1 & PWM2, XC8 Read More »

Tagged with: , , , , , , , , , , , ,

The LED flashes approximately 150ms every 5 seconds. RC1 (pin 9), triggers the LED. Interestingly, the PIC consumes 28uA at idle, no matter which method is used. Compiles with Microchip’s XC8 (v1.38) Delay function, 28 bytes Timer 0 delay, 31 …

PIC16F684 Flashing an LED with delay_ms, TMR0, Interrupt, & WDT Read More »

Tagged with: , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

This isn’t a magical cut and paste example. YOU need to do some work.  Why? There are a number of Vishay thermistors, all with different properties and I don’t know which one you have. The values included here are for …

Using Vishay NTCASCWE3102J or NTCASWE3xx NTC Thermistors with the PIC18F2550 Read More »

Tagged with: , , , , , , , , , , , ,

Microchip MPLAB X XC8: Enable the Peripheral Library

In order to use the peripheral libraries built into MPLAB X a switch must be set in the project properties. Right click project name from the Projects window and select Properties Second, navigate through the Categories [default] -> XC8 global …

Microchip MPLAB X XC8: Enable the Peripheral Library Read More »

Tagged with: , , , , , ,

So, you’re missing a few 32 bit libraries on your 64 bit Fedora install. Note, I DID NOT need to install 32-bit java. # java -version openjdk version “1.8.0_111” OpenJDK Runtime Environment (build 1.8.0_111-b16) OpenJDK 64-Bit Server VM (build 25.111-b16, …

Install MPLABX 3.45 on Fedora 24 x64 SOLVED Read More »

Tagged with: , , , , , , , , , , , , , , , ,

This example demonstrates a high priority interrupt on the PIC18F2550 and MPLABX 3.40 IDE with the XC 1.38 compiler. Make sure YOU remove the spaces WordPress throws in, if not your compiler will whine. Sorry, I can’t assist if you …

High Priority Timer on a PIC18F2550, XC8 Read More »

Tagged with: , , , , , , , , , ,