|Language:||English • magyar|
- 1 Important Warnings for all Pinguino Users
- 2 Features
- 3 CAD Files (Kicad)
- 4 Board Overview
- 5 Building Instructions
- 6 ICSP Programming (if required)
- 7 Testing the assembled board
- 8 First Programs : 6 ways to blink a LED
- 9 USB HID Read Write Interrupt Example
- 10 Troubleshooting
- 11 Pin Out
- 12 Fritzing
- 13 How to get one ?
Important Warnings for all Pinguino Users
Important Warnings: Please read the important warnings at least once!
This version of the Pinguino board is built with a Microchip PIC18F26J50 microcontroller. It works with an 8 or 20 MHz crystal and is USB 2.0 compatible.
The characteristics of this board are:
- 8-bit 12 MIPS processor core running at 48Mhz
- 64K Program Flash Memory
- 3800 RAM bytes
- 17 digital input/output with 5 shared analog inputs,
- 2 UART for serial communications,
- 2 fast PWM output (3000 Hz),
- 5 analog inputs (10-bit ADC)
- Peripheral Pin Select for mapping digital peripherals to various I/O ports for design flexibility,
- Hardware RTCC provides clock, calendar & alarm functions,
- Charge Time Measurement Unit (CTMU) supports capacitive touch devices,
- Operating voltage 2.0 - 3.6V, 5.5V tolerant digital inputs.
The Microchip datasheet, errata, application notes, code examples and software libraries for the PIC18F26J50 are available here.
CAD Files (Kicad)
KiCad is an EDA software suite for the creation of professional schematics and printed circuit boards up to 16 layers. KiCad runs on Windows, Linux and Apple OS X and is released under the open-source GNU GPL v2 free of charge. With Kicad you can do the following :
- Schematic design.
- Netlist creation in multiple formats (PCBNew, OrCAD, CadStar, Spice, etc...).
- PCB design
- 3D visualization of your PCB
- Fabrication outputs generation (Gerber, drill files and whatever can be needed to manufacture a PCB.)
For a more detailed explanation please refer to the official Kicad site.
Kicad Schematics and PCB of the Pinguino 26J50 can be found here.
For a better result we use libraries, modules en 3D packages from Walter : http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm
There is one switch to reset the board. When reset is held, the board is in bootloader mode waiting for an upload from the development computer for 5 seconds. After 5 seconds, the current program in memory is run.
This board can be powered by the USB connector (5V), the Zener diode gives 3.3V to the chip. It can also be powered by an external power supply (>5V).
Bill Of Components
- JP1 USB Type-B Female
- K1 PWM (3-pin 2.54mm header strip *)
- K2 Power (3-pin header strip *)
- P1 Analog (6-pin header strip *)
- P2 Digital (8-pin header strip *)
- P3 UART (2-pin header strip *)
- U1 DIP28 socket (or 2x14-pin round female header strip)
(*) Use 2.54mm Single Row Male Header Strip if you want a breadboard-ready Pinguino, Female if you want it like an Arduino.
- SW1 Push Button (Reset)
- X1 8- or 20 MHz crystal (low profile)
- U1 PIC18F26J50 (DIP package)
- PCB Pinguino 26J50 Printed Board Circuit
Before you start soldering
- Please read this before soldering.
The PCB has 2 sides. One is the component side (below):
The other one is the solder side (below):
On the component side of the board, identify the holes corresponding to the component's leads. Insert the leads in these holes and slightly bend them on the other side of the board so that the component does not fall off when the board is turned over for soldering.
Turn the PCB over and put it on a flat and dry surface with component side facing down.
Hold the solder wire at the interface of any one of the leads and its pad and touch it with the soldering iron tip. The solder will melt and cover the pad within 3 seconds. Retract the soldering iron tip and the solder wire. Repeat this process to solder the remaining leads of the component.
For more info on soldering, see here.
Populated component side
Populated solder side
Important Note: The longer pins of the male pin headers go through the PCB holes so that you can put the completed Pinguino board on a breadboard. Experience suggests that you should use a pair of pliers or the method in the photos below to push the short end through the plastic header to make the long end of the pins longer, otherwise you may not be able to securely plug the Pinguino into a breadboard without it "popping out".
- Place and solder all the pin-header connectors.
- D0 to D7 (8-pin)
- D9 and D8 (2-pin)
- Power (3-pin)
- D10 to D12 (3-pin)
- RST, A0 to A4 (6-pin)
- Place and solder all the resistors. Resistors are not polarised, so it does not matter in which direction they are placed, but for aesthetic purposes it makes sense to have them all point in the same direction. Trim the wires.
- Place and solder the BZX85C3V3 diode. The (black) band on the diode must be at the side of the white band on the PCB silkscreen (white print on the PCB). Trim the wires.
- Place and solder the two 22pF capacitors (marked as 22). These capacitors are not polarised, so it does not matter in which direction they are placed, but it makes sense to place them so that you can still read their markings. Trim the wires.
- Place and solder the 8- or 20 MHz crystal. Trim the wires.
- Place and solder the 2 x 14 round female header strip (as a DIP28 socket).
- Place and solder the two 100nF capacitors (marked as 104). These capacitors are not polarised, so it does not matter in which direction they are placed, but it makes sense to place them so that you can still read their markings. Trim the wires.
- Place and solder the switch button. Even if they look to be square, the four leads are not, so take extra care to insert the switch the right way round.
- Place and solder the LED. This is a polarised part so the shorter lead must be put connected to GND. In other words: insert the shorter wire in the hole nearest to the edge of the PCB. Trim the wires.
- Place and solder the polarised 10uF electrolytic capacitor. The white stripe on the side of the capacitor must be at the side of minus sign in the PCB silkscreen (in other words, next to the 22pF capacitors). Trim the wires.
- Place and solder the USB connector. Bend the two metal mounting tabs before soldering.
- Place the PIC18F26J50 microcontroller in its socket. This will be easier if you first bend the two rows of pins a little bit in towards each other. Note that the microcontroller chip has a notch at one end. This notch must be at the end where the button switch is located.
ICSP Programming (if required)
In-Circuit Serial Programming (ICSP) is a way to upgrade/burn the Pinguino's firmware (bootloader).
Upgrading/burning the firmware is necessary only in two cases:
- you made your Pinguino yourself, you need to burn the bootloader only once.
- (in the unlikely event that) you crashed your Pinguino board.
If you bought a commercial board or you bought a board from the Pinguino Shop, the bootloader has been already burnt.
The source code (to be compiled) and .hex files (the one needed by your programmer, already compiled) for the bootloader (v4.x) can be downloaded at:
Using a PICkit-like programmer
Connect the PICkit or PICkit-like programmer with an ICSP Cable to the Pinguino pins (see table below) and upload the firmware with, for example, the Windows/OS X/Linux MPLAB X IDE, the Windows only MPLAB IDE or the Windows/OS X/Linux PICkit2 standalone program.
|ICSP Connector||Microchip name||Pinguino name|
Using another Pinguino
In this part, I will explain how to connect a Pinguino to program the bootloader (firmware) on another one.
TO BE COMPLETED (for more information read PIC18F2550_Pinguino#Pinguino_Self-replication)
Testing the assembled board
Connect a USB cable between your PC and your Pinguino board. The bootloader waits 10 seconds for a program to be uploaded during which time the red LED blinks every half-second.
If the board is powered with an external power supply and the USB to PC cable is not connected, the bootloader waits about 5 seconds during which time the red LED stays lit.
Your are ready to play with your board and the Pinguino IDE.
Here are 6 ways to blink the built-in Led (User Led) on your new Pinguino board.
USB HID Read Write Interrupt Example
Problem(s) with your Pinguino hardware? Please find help in the Forum here.
|Pin name||PCB Label||Digital I/O||up to 5.5V tolerant||Analog input||Other||Pin on Chip||Microchip name|
|2||D2||Yes||yes||nohw||CTMU Edge 1 input||23||RB2/AN8/CTED1/VMO/REFO/RP5|
|3||D3||Yes||yes||nohw||CTMU Edge 2 input||24||RB3/AN9/CTED2/VPO/RP6|
|5||D5||Yes||no||-||SPI1 SDI (MOSI) - I2C1 SDA||26||RB5/KBI1/SDI1/SDA1/RP8|
|9||D9||Yes||yes||-||Serial Rx - SPI1 SDO (MISO)||18||RC7/RX1/DT1/SDO1/RP18|
|10||D10||Yes||no||-||Timer1 digital clock output||11||RC0/T1OSO/T1CKI/RP11|
|11||D11||Yes||no||-||Timer1 digital clock input||12||RC1/T1OSI/UOE/RP12|
|Reset||RST||-||yes||-||Reset switch / ICSP MCLR||1||MCLR|
|OSC1||-||-||no||-||8- or 20 MHz crystal||9||OSC1/CLKI/RA7|
|OSC2||-||-||no||-||8- or 20 MHz crystal||10||OSC2/CLKO/RA6|
- Note hw: Analog input hardware available, but no software support
- Note all: If one pin between 13 and 17 is used as analog input, all those pins are configured as analog inputs.
How to get one ?
The PIC18F26J50 microcontroller with the USB bootloader kit is NO LONGER available from the Pinguino Shop