Welcome to Embedded Code Source
A "one-stop shop" where you can browse and download free software/firmware code examples for your PIC® MCU projects. The primary purpose of this site is to help you get your application to market faster! Here, you'll find code for controlling simple timers & UARTs, low power modes, Fast Fourier Transforms, LCD displays, motor-control algorithms, and many more.
This site also provides interaction with the Microchip community, as well as Microchip's elite group of 3rd party developers.and, if you're pressed for time, you can hire one of those developers to get the job done for you.
Start now by browsing the categories to the left or using the above search box-and then start downloading!
Browse Embedded Code Source
-
Software UART by Datadog Systems
Add RS-232 capability to any PIC processor. The example code uses the smallest PIC10F to show how it is done.
-
CE019 - PID for Closed-Loop Systems by Microchip Technology This code example demonstrates a Proportional Integral Derivative (PID) Controller using a dsPIC30F6014A. The PID controller can be found as part of the MPLAB C30 DSP library functions starting from version 2.0 of the toolsuite. Works for AC Induction,...
-
Operating an External LCD by Microchip Technology In this code example, XLCD library support for PIC18F4685 is used to interface the device with LCD module available on PICDEM2+ board.
-
CE018 - Using the Fast Fourier Transform (FFT) for Frequency Detection by Microchip Technology In this code example, we demonstrate how the DSP library functions can be used to perform an FFT on an input signal (vector).
-
CE306 - LCD Display with PMP by Microchip Technology This code example describes how to use PMP on PIC24F to drive an LCD display.
-
Operating an External LCD by Microchip Technology In this code example, XLCD library support for PIC18F4685 is used to interface the device with LCD module available on PICDEM2+ board.
-
CE154 - ADC to DAC Loopback by Microchip Technology In this example, ADC is configured to sample (AN4) at 103.16 KHz rate and the converted data is assembled in a 256-sample buffer. The captured 256 samples are output using the on-chip DAC.
-
CE139 - 10-bit ADC Sampling at 2.2MSPS by Microchip Technology This test code is designed to sample channel AN0 at 2.2MSPS (single-shot acquisition) using an ADC interleaving technique. This will allow 24H/33F devices with 2 ADC modules to double the maximum sampling rate vs. a single ADC.
-
CE152 - Parallel Master Port (PMP) Graphics Example by Microchip Technology This code example aims to demonstrate the basic initialisation and operation of the Parallel Master Port (PMP) module. It also demonstrates to communicate with the LCD module using PMP and display a set of characters on the LCD panel. The PMP module...
-
PIC32 ESK, USB, CDC Device Demo by Microchip Technology PIC32 Demonstration of ESK, USB, CDC
-
CE137 - UART with no DMA by Microchip Technology Small, bare bones program to guide designers with UART implementation on PIC24F or dsPIC33F
-
CE229 - ECAN Remote Transmission Request by Microchip Technology Transmitting a Remote message from ECAN1 and requesting transmission from ECAN2
-
CE146 - Adaptive Notch Filtering using LMS Algorithm by Microchip Technology A Least Mean Square Adaptive Notch Filter is used for cancellation of sinusoidal interferences in amplitude sensitive information signals like ECG and other biomedical signals.
-
CE147 - Signal Matching using Coherence Function by Microchip Technology In this example, ADC is configured to simultaneously sample two signals using AN0 and AN1 through channel 0 and channel 1 at 250KHz. The two discrete signals thus sampled and discretized are assembled in to two 512 element buffers and are spectrally matched...
-
CE145 - Using I2C module as Slave device by Microchip Technology This code example shows how to use I2C module in slave mode. To demonstrate it, dsPIC33FJ is used as I2C slave device. The master I2C device uses the slave I2C device as RAM. Thus the master I2C device can read/write particular RAM area of I2C slave device.