PIC18F26J50 Pinguino

= Important Warnings for all Pinguino Users =

Important Warnings: Please read the important warnings at least once!

= Features =

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

= Board overview =



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

= Building Instructions =

Bill Of Components
Connectors
 * 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.

Others
 * 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

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


 * 1) D0 to D7 (8-pin)
 * 2) D9 and D8 (2-pin)
 * 3) Power (3-pin)
 * 4) 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:


 * 1) you made your Pinguino yourself, you need to burn the bootloader only once.
 * 2) (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:
 * source code
 * .hex files

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.

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)

= Testing the assembled board =

= First Programs : 6 ways to blink a LED =

Here are 6 ways to blink the built-in Led (User Led) on your new Pinguino board.

= USB HID Read Write Interrupt Example =

See: MikroElecktronika mikroPascal Pro example

= Troubleshooting =

Problem(s) with your Pinguino hardware? Please find help in the Forum here.

= Pin Out =




 * Analog input hardware available, but no software support
 * If one pin between 13 and 17 is used as analog input, all those pins are configured as analog inputs.

= Fritzing =

You can get all necessary files to use your Pinguino 26j50 with Fritzing here.

= How to get one ? =

Buy it
The PIC18F26J50 microcontroller with the USB bootloader kit is NO LONGER available from the Pinguino Shop

Make it

 * 1) Assemble it yourself on a breadboard
 * 2) Use the Kicad board file to generate your own Gerber files using Kicad or Eagle or your favourite PCB CAD program. You can then get your own PCBs manufactured by sending the Gerber files to one of the cheap PCB prototyping services.