Date: "05 - March - 2013"

1 articles found.

How to Burn MikroC code Using PICkit3

mikroC firmware programming, PICkit 3 programmer, PIC HEX file workflow, MPLAB programming tutorial

Hello friends! In this tutorial, we will learn how to program a PIC microcontroller with code compiled in mikroC PRO for PIC, using a PICkit 3 programmer. The useful idea is simple: mikroC builds the firmware, and Microchip's programming software loads the resulting HEX file into the selected device. The original project behind this lesson required mikroC, while the available programmer was a USB-connected PICkit 3. Moving from a serial-port programmer to PICkit 3 made the laptop connection easier, but the compiler and programmer still needed a common file format. The HEX file provides that connection without requiring us to compile the project again in another C compiler. We will preserve the original MPLAB IDE screenshot sequence, explain what each step does, and cover the important checks for target power, device selection and configuration bits. We will also distinguish the old MPLAB interface from MPLAB X and IPE so that you do not search for menus that belong to a different application. mikroC translates your source code and linked libraries into instructions for the selected PIC device. The programmer does not normally need the original C source to write those instructions into program memory. It needs the programming image, the correct device definition and a working electrical connection to the target. This explains why the original requirement for the C18 compiler was unnecessary for the transfer itself. If mikroC has already produced a valid image, a second ...