First Time Programming a Microcontroller




First Time Programming a Microcontroller

In my previous post we have carried out the construction of the base Circuit board for our USB demo Interface Board.So lets begin with out next part for little but more info about the pic18f USB on PCB. (If wish then you can also review my pic18f4550 tutorial for beginner) . So lets get on with usb board now.First Time Programming a Microcontroller

Simply connecting the USB cable from your computer to the USB Interface Board immediately after you complete the soldering won’t make it start working right away.  Of-course like any new hardware installation you will need drivers for windows in order it to get detected by the system. I will provide the links for the driver in my coming posts. The drivers are coded by Microchip. And in order for the driver to communicate with the board the chip must be programmed first, with some sort of firmware. The codes for the micro-controllers are written with some special IDE softwares which have their own programming language which is similar to C.

 After the code is compiled to respective output , you will need a special hardware to fuse these output code into the chip. Don’t worry about coding, I have already done that for you and the download link for compiled code will be provided as promised. Usually the output loaded into the EPROM of the microcontroller is called the firmware. It is loaded into the EPROM of the chip, once the firmware [the output of the IDE ] in loaded into the chip it will detect the board and we have to provide the driver. After we are done with making the board, the next step would be to load it with a firmware !!
NOTE: Without a base firmware loaded into the microcontroller, the microcontroller  will not be detected by the system. So next  task is to load a firmware program into the PIC18f4550 which cannot be done with the board that we just prepared. For Beginners, the first time programming of the microcontroller will need an external (Microcontroller programmer ) device like pickit 2 , but as it has to be used once , just once , so at initial stage we will use a cheap alternative, that will be our JDM programmer. Generally if everything goes right then you will need JDM programmer just once i.e the first time loading of the firmware into the chip.

JDM programmer is not so famous but it is easy to make and cheap, so beginners can go with it pretty fine . Once a sample demo firmware is loaded into the microcontroller then later you can update the microcontroller‘s firmware with your own CODE directly from the demo board using a boot-loading software.




PIC18F4550 belongs to www.microchip.com, you can find various resources and interesting materials on their website or you can also check my version of tutorial.

 For further steps you need to download microchips MCHPFSUSB framework, from microchip’s website, it contains various examples, driver and some precompiled demo firmware we need.

Microchip appliction libraries

There are many versions of MCHPFSUSB which were released later , the version I used for my board was  MCHPFSUSB v1.2 , you can download and install it to continue further steps .First Time Programming a Microcontroller schematic

you can download it from their website. The links for those download page are  It will  install some packages  by default in C:\ drive of your system.

For the 1st time loading you need a base firmware or a demo firmware, The firmware usually comes in .hex format. You can find it. Copy the string and save it as firmware.hex . We will load this firmware.hex into the microcontroller in later steps.

With the help of JDM programmer (a hardware) and a software we will load firmware into the pic18f4550, In coming posts we will also learn how to Make your own JDM programmer and also a step by step tutorial to load the firmware into chip using a software named winpic800.

For more detail: First Time Programming a Microcontroller




Leave a Comment

*
= 4 + 7

Read previous post:
1.2V to 35V DC-DC Converter
1.2V to 35V DC-DC Converter

1.2V to 35V Adjustable DC-DC Converter project has been design around TI’s  LM2576-ADJ IC. Inputs supply 40 VDC.  LM2576-ADJ is...

Close
Scroll to top