Join us, let's discuss Web3, crypto and blockchain technology.

Thumbnail

How Program PIC16F887 Microcontroller

To start learning pic microcontroller programming, you should have a grasp of PIC16F887 GPIO pins. We can use either assembly language or c programming to program microcontrollers. 

The PIC microcontroller can be programmed using a variety of software available on the market. There are still people that program PIC MCUs in Assembly language. The following information pertains to Microchip's most advanced and widely used software and compiler.

An IDE (Integrated Development Environment), which is where the programming takes place, is required to program the PIC microcontroller. A compiler converts our software into HEX files, which can be read by MCUs. Our hex file is dumped into our PIC MCUs using an IPE (Integrated Programming Environment).

IDE: MPLABX v3.35

IPE: MPLAB IPE v3.35

Compiler: XC8

 

We'll need a gadget called PICkit 3 to dump or upload our code into PIC.

Interface the hardware (programmer kit) to the computer through a serial cable

Place the microcontroller in the socket of the hardware kit. Press the lock button to ensure the microcontroller is connected to the board.

Open the software installed on the computer. This shows the menu bar with file, functions, open, save, and setting options.

Select the ‘open’ option from the drop-down menu and select the ‘load file’.

Click on the ‘load’ button so that the hex file is loaded into the microcontroller.

The PICkit 3 programmer/debugger is a low-cost in-circuit debugger controlled by a PC running MPLAB IDE (v8.20 or higher) on a Windows platform. The PICkit 3 programmer/debugger is a must-have tool for any development engineer. Other gear will be required, such as a perf board or breadboard, a soldering station, PIC ICs, Crystal oscillators, capacitors, and so on.



dp

Read next...

Mountains
Hivefirm
Hivefirm is a future focused community for all things Web 3 and crypto-related content

Follow us

Discover more of what matters to you