The aim of this paper is to describe the very first steps in order to install the development system MPLAB-IDE, the compiler MPLAB-C18, the bootloader, and to verify the PIERIN board is working properly and it will connect to the bootloader via USB. Once the entire system is running you may move on, to make the first programming experience.
Obviously you need to familiarize with the C language, but let's face the truth, for a microcontrollerist, the knowledge of the C language is a must: sooner or later you will have to learn it.
Getting the software
- Download the micro's Data Sheet. The Data Sheet is to be considered the Book of the Holy Law. You should keep one eye on it all the time, it has to be consulted in times of trouble and, in it, you will find all the answers. Randomly errors occur, so it is good to take a look at the errata section. Without the Data Sheet you will wander around nowhere, and, in particular, YOU WILL NOT LEARN ANYTHING.
- Download MPLAB-IDE. It is a Zip file. Unzip it into a folder, first of all.
- Download MPLAB-C18 lite version. It is important to download the lite version because it will not expire. It is not powerful like commercial versions but all the software from Microchip is rightly compiled and works well with it. It is required to register with the website. Once registered you may download the software from the page.
- Install MPLAB-IDE, launching the Setup program.
- Install the compiler MPLAB-C18.
- To use the bootloader (Windows version) download the software attached to this paper, extract all the files in the same folder where the file HIDbootloader (Windows).exe is.
Now I suggest to move this folder into the Microchip folder. Create a shortcut to HIDbootloader(Windows).exe and place it on the desktop, for example, to have it reachable at any time.
Let's switch on the PIERIN board
The PIERIN board comes with the bootloader already programmed. Otherwise it would not be usable without the PICKIT3. Anyway, it comes, as well, with a demo program loaded into, just to have no doubts it works. When you plug it in the USB port, you will see the two LEDs flash alternately. By pressing the pushbutton one or two(or both simultaneously) the alternate flashing stops and the LED corresponding to the pressed key will blink at double speed until it is released.
To test the USB connection, simply press the RESET button. The LED will remain off and, in the meantime, you will hear the sound from the PC indicating that a USB device has been connected. No driver is required because this is a HID (Human Interface Device), the same class of devices such keyboards and mouses. There is nothing to install, if you can hear the sound it means that everything is working fine.
The video down here shows the operation.
Let's verify the bootloader
The last test we have to do is to check that the bootloader can operate the board. I will quote, directly from the Microchip documentation, an important note:
"Therefore, in order to use this program, you will need to have the. NET framework version 2.0 (higher version probably okay, Although not tested) installed on your computer. If you do not have the. NET framework 2.0 installed, not -descript error message will occur When trying to launch the executable, and the program will not open. "
So, if you have not downloaded NET framework version 2.0 yet, do and install it now.
If you are able to launch HIDBootloader (Windows).exe this window will come up
Now we have to connect the USB to the PIERIN board. The LEDs will start to flash. Now press the RESET button, the PC will make the sound of the USB and the bootloader window will turn like in this figure.
Well, if you are here you are ready to start experimenting with this board. Go ahead to the next paper to learn about how to create a project from the baseline model.
Have a NICE EXPERIMENTATION!
The software for the bootloader can be downloaded using this link.