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.
- 40 pins PIC Start-Up Kit Combo 2 (SK40-C2) – 1
*contains SK40C board and PIC18F4550 microchip
- USB MiniB Cable (2.0) (WR-USB-M) – 1
- USB ICSP PIC Programmer V2010 (UIC00B) – 1
Tools and Equipment:
- Soldering Iron
- Solder Lead
- Solder Paste (optional)
- 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.
- Cytron tutorial PINGUINO
- Cytron tutorial Pinguino Software Installation (Windows XP) for Windows XP users
- Cytron tutorial Pinguino Software Installation (Windows 7) for Windows 7 users
- User manual and other related materials of SK40-C2, can be downloaded from Cytron Technologies, SK40-C2.
- User manual and other related materials of UIC00B, can be downloaded from Cytron Technologies, UIC00B.
- Plug in the PIC18F4550 microchip to the 40-pin IC socket of the SK40C board.
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.
- 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
- 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
- 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.
- 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
- 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.
- For the pop-up window, choose the selections as shown in figure below and press the OK button.
Figure 4: Board Selector window
- 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.
- 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
- 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
- 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.
- 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.
- 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 🙂