SK40C + PIC18F4550 as Pinguino

Introduction

Pinguino is an easy-to-make Arduino-like board based on 8-bit (PIC18Fx550, PIC18Fx5K50, PIC18Fx6J50 and PIC18Fx7J53 family) and 32-bit (PIC32MX Mips family) microcontrollers. In this tutorial, users will be guided to turn a SK40C board with PIC18F4550 microchip into a Pinguino board and program it for LED blinking.

Hardware Required:

 Electronic Components:

 Tools and Equipment:

  • Soldering Iron
  • Solder Lead
  • Solder Paste (optional)

 Software required:

  • PICKit2 V2.61, can be downloaded from Cytron Technologies.
  • Pinguino IDE, can download here.

    * Pinguino IDE used is this tutorial demonstration is Pinguino X.4.

  • PIC18F4550 Pinguino Bootloader V2.12, can download here.

     

Related Reference:

Procedure:

  1. Plug in the PIC18F4550 microchip to the 40-pin IC socket of the SK40C board.
  2. Load the Pinguino bootloader V2.12 downloaded into the PIC18F4550 microchip using UIC00B programmer through software, PICKit2. This step is to enable the SK40C board with PIC18F4550 microchip to be detected as Pinguino board when it is connected to the computer through USB connection.

  3. Solder to connect the JP9, USB SEL on the SK40C board so as to establish the connection between the PIC18F4550 microchip and the USB connector of the SK40C board.


    Figure 1: Solder the JP9 USB SEL connection

  4. Now, let’s proceed to the Pinguino software installation in Windows. First, connect the SK40C board with PIC18F4450 microchip to the computer using USB miniB cable (2.0).


    Figure 2: Connection of SK40C board to computer through USB cable

  5. The remaining steps for installation can be referred to tutorials for Pinguino software installation with provided links in the related reference section above.

*The Pinguino IDE used in this demonstration is Pinguino X.4. It has the win32 compiler integrated. Hence, during the last part of installation shown in the tutorials, the installation step of the win32 compiler can be omitted.

*Further information on installation of Pinguino X.4 can be referred here.

  1. After the installation is done, run the pinguino.exe to launch the Pinguino IDE. The appearance of the IDE is shown below.


    Figure 3: Pinguino IDE welcome screen

  2. The first step to program the Pinguino board (SK40C + PIC18F4550) is to select correct Pinguino board in the Pinguino IDE. Go to the Pinguino > Select Board or press the Select Board icon, at the top of Pinguino IDE window.
  3. For the pop-up window, choose the selections as shown in figure below and press the OK button.


Figure 4: Board Selector window

  1. Next, go to File > New or press the New icon, at the top of Pinguino IDE window to open new file for entering program code.
  2. Enter program code for the LED blinking as shown in Figure 5 below. This program involves blinking of LED1 and LED2 which are connected to pin RB6 and pin RB7 of PIC18F4550 microchip as shown in Figure 6. While, pin RB6 is pin no.39 and pin RB7 is pin no.40 of the PIC18F4550 microchip. According to I/O pins mapping of the Pinguino as shown in Figure 7, the pin RB6 and pin RB7 are mapped as Pin 6 and Pin 7 in Pinguino.


    Figure 5: Program code for LED blinking


    Figure 6: LED1 and LED2 on the SK40C board


    Figure 7: I/O pins mapping of Pinguino

  3. After that, compile the code entered. Go to Pinguino > Compile or press the Compile icon, . Make sure the compilation is done with no error. If the compilation process is successful, the appearance of the black screen at the bottom of the Pinguino IDE should be similar as shown below.


    Figure 8: Successful compilation

  1. As the code compilation is completed, it’s time to upload the program to the Pinguino board (SK40C + 18F4550). Firstly, press the RESET button on the SK40C board and release. Wait for 3 seconds and then go to Pinguino > Upload or press the Upload to Pinguino icon, to upload program into the Pinguino board.
  2. If the upload process is successful, the appearance of the black screen at the bottom of the Pinguino IDE should be similar as shown below.


Figure 9: Successful upload

*If you get ‘Pinguino found’ followed by nothing as you have waited too long, please repeat the step 12 again.

  1. As the result, the LED1 and LED2 on the SK40C board will blink at rate of 1Hz.



    Figure 10: LEDs blinking

The tutorial ends here. Hope you have fun with your new configure Pinguino board. See ya!

Not to forget, this tutorial can be applied to SK28A + PIC18F2550 too! If you have further question or suggestion, please feel free to discuss in our technical forum, we seldom check the comments in tutorial site 🙂

Attachments:

Buy

Leave a Reply

Your email address will not be published. Required fields are marked *