Cos'è ElectroYou | Login Iscriviti

ElectroYou - la comunità dei professionisti del mondo elettrico

Ricerca personalizzata
12
voti

[EN] PIERIN PIC18 Getting Started

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.

Indice

Getting the software

Two softwares are essential to develop with the PIERIN board: MPLAB-IDE and the compiler MPLAB-C18. You can easily download them from the Microchip website.

Hence:

  • 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.
  • 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

bootloader_non_conn.jpg

bootloader_non_conn.jpg

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.

bootloader_connesso.jpg

bootloader_connesso.jpg

We're ready!

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.

3

Commenti e note

Inserisci un commento

di ,

Thanks, buddy!

Rispondi

di ,

Very helpful, nice work man! ;)

Rispondi

di ,

Ho provveduto a tradurre, concordando la cosa con TardoFreak, il primo articolo della serie PIERIN. Tradurrò anche gli altri, per comodità di consultazione per chi non parla Italiano. Segnalatemi errori, orrori, omissioni e quant'altro. Ciao da Pietro. I did my best to create an English version of the first Pierin paper series. I will translate the other ones, as well. Please let me know typo, errors and anything you think should be modified. Ciao by Pietro.

Rispondi

Inserisci un commento

Per inserire commenti è necessario iscriversi ad ElectroYou. Se sei già iscritto, effettua il login.