PIC18F45K50 Pinguino/hu

From Pinguino-Wiki
Jump to: navigation, search
Language: English  • Español • Magyar


Contents

Fontos figyelmeztetés minden Pinguino felhasználónak

Fontos figyelmeztetés: Kérlek olvasd el a fontos figyelmeztetés-t legalább egyszer!

Funkciók

A Pinguino Board-ok ezen verziója Microchip PIC18F45K50 mikrocontrollerrel lett tervezve. Ez a Pinguino láb kompatibilis a régebbi 4550 Board-dal, képes +5V-ról működni.Valamint precíziós USB oszcillátorral rendelkezik ami lehetővé teszi USB projekt építését külső oszcillátor nélkül is. További fontos modul a CTMU. ami mérőberendezésekben használható fel.

A Board működtethető belső oszcillátorról vagy külső 8 vagy 20 MHz-es kiristállyal.. A Pinguino 45K50 USB 2.0 kompatibilis.

A Board jellemzői:

  • 8-bites 12 MIPS sebességű processzor mag ami 48Mhz-en fut
  • 32K Program Flash Memory
  • 2048 Byte RAM
  • 256 Byte Data EEPROM
  • 17 digitális bement/kimenetamiből 5 lehet analóg bemenet is
  • 1 a soros kommunikációhoz, 1 SPI és 1 I2C
  • 2 gyors PWM kimenet (3000 Hz)
  • maximum 25 csatorna 10-bit ADC Feszültség referencia modullal
  • 2 Analóg komparátor
  • 5-bites D/A konverter (DAC)
  • Charge Time Measurement Unit (CTMU) mérő berendezésekhez
  • 2x 8-bites időzítő
  • 2x 16-bites időzítő
  • Működési feszültsége +5V
P45K50-03a.png

Az eredeti (angol) Microchip adatlap, hiba jegyzék, felhasználási példák és példa programok a PIC18F26J50 eszközhöz itt találhatóak.

CAD File-ok (Kicad)

KiCad egy EDA (tervezői) szoftver ami lehetővé teszi professzionális kapcsolási rajzok és nyomtatott áramkörök létrehozását. Utóbbit akár 16 szinten (layer) is. KiCad elérhető Windows, Linux és Apple OS X rendszereken és a licence a nyílt forrású GNU GPL v2 szabad szoftwer. KiCad-el te is meg tudod csinálni:

  • Kapcsolási rajz
  • Összekötési lista több formátumban (PCBNew, OrCAD, CadStar, Spice, ...)
  • PCB tervezés
  • 3D megjelenítésea a panelednek
  • Gyártási fájlok generálása (Gerber, fúró file-ok és bármi, ami a gyártáshoz kellhet)

További részletes magyarázatért keresd fel a hivatalos Kicad oldalt.

KiCad kapcsolási rajz és panel terv Pinguino 45K50-hez itt található.

A jobb eredmény eléréséhez mi felhasználtunk külső könyvtárakat is Walter-től : http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm

Board ismertetés

Schematic

A Bord-on található Reset gomb. Mikor a RESET gomb meg lett nyomva a Board letöltési üzemmódba lép. Ha 5 másodpercen belül a Pinguino IDE nem indít el letöltést, akkor az aktuális program elindul.

A Board a tápellátást USB-ről kap (+5V). Természetesen külső tápegységről is üzemeltethető opcionális +5V-os feszültség szabályozón keresztül (LM7805) VIN csatlakozás használatával. Továbbá két külső tápfeszültség csatlakozáson keresztül is üzemeltethető +2.3V - +5.5V közötti feszültséggel.

Kérlek olvasd el a PIC18F45K50 adatlapját is.

Building Instructions

The Pinguino 45K50 is one of the most simple boards to assemble.

It is small (71x26mm) but very easy to solder, even for kids.

It needs only 4 resistors and 3 capacitors to work.

We have added 2 LEDs, one reset button and a USB connector (as every Pinguino is a full-speed USB device).

The Pinguino 45K50 is also an upgradeable board.

If you need it, you can add a 5V regulator to feed the board from an external power supply.

It's also possible to add an external crystal. In this case, note that the PCB is fully compatible with the PIC18F4550 so you can easily turn your Pinguino 45K50 into a Pinguino 4550.

Bill Of Components

Resistors
  • R1,R2,R4 470 Ohm (Yellow - Purple - Black - Black)
  • R3 10K Ohm (Brown - Black - Orange)

Capacitors

  • C1,C5 100nF (marked as 104)
  • C2 220nF (marked as 224)

Diodes

  • D1, D2 3mm Red LED (+/anode = long lead)

Connectors

  • JP1 USB Type-B Female
  • P1,P2 2.54mm header strip (*)
  • K1 Power selector (3-pin header strip)
  • 18F45K50 2x20-pin round female header strip

Others

  • 18F45K50 PIC18F45K50 (DIP package)
  • SW1 Push Button (Reset)
  • PCB
P45k50-00.jpg

Optional

  • C6,C7 22pF (marked as 22)
  • C3 22uF (polarized, marked as 22uF)
  • C4 100nF (marked as 104)
  • X1 8- or 20 MHz crystal (low profile)
  • U1 LM7805 (5V regulator)
  • P0 External Power Supply connector (3-pin header strip)
  • 18F45K50 PIC18F45K50 or PIC18F4550

(*) Use 2.54mm Single Row Male Header Strip if you want a breadboard-ready Pinguino, Female if you want it like an Arduino.

Before you start soldering

  • Please read this before soldering.

The PCB has 2 sides. One is the component side (below):

P45k50-01a.jpg

The other one is the solder side (below):

P45k50-01b.jpg

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 out 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 soldering iron tip against one of the leads and the PCB pad for a few seconds until the joint heats up, then apply the solder wire to the joint. The solder will melt and cover the lead and the pad. Remove the soldering iron tip and the solder wire from the joint and allow the joint to cool for a few seconds. Repeat this process to solder the remaining leads of the component.

For more info on soldering, see here.

P45k50-02.jpg

Populated component side

Construction

  • Place and solder all the resistors (3x 470R and 10K). 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.
  • Optional : place and solder the two 22pF capacitors (C6 and C7, 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.
  • Optional : place and solder the 8 or 20 MHz crystal. Trim the wires.
  • Place and solder the 2 x 20 round female header strip (as a DIP28 socket).
  • Place and solder the 100nF capacitors (C1 and C5, C4 is optional, 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 220nF capacitor (C2, marked as 224). This capacitor is not polarised, so it does not matter in which direction it is placed, but it makes sense to place it so that you can still read its marking. Trim the wires.
  • Place and solder the 2-pin switch button. It does not matter in which direction it is placed.
  • Place and solder the 2 LEDs. An LED 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 switch button. Note that the Power LED is the nearest to the USB connector. Trim the wires.
  • Optional : place and solder the polarised 10uF electrolytic capacitor. The white or black stripe on the side of the capacitor must be at the side of minus sign on the PCB silkscreen (in other words, next to the 100nF capacitor). Trim the wires.
  • Place the USB connector and bend the two metal mounting tabs. Then solder it in place.
  • Place and solder all the pin-header connectors. Note they can be soldered on either side. It´s up to you. If you want to plug your board into a standard 2x5 solderless breadboard take care as you will only have one free row of holes to make connections once the board has been inserted.
  • Place and solder a 3-pin header connector where the silkscreen shows EXT|USB (at the end of the board. Place a jumper at the EXT or USB side to select External or USB power supply. If you only use the USB power supply you can just connect the 2 pins at the USB side with a wire or with some solder.
  • Place the PIC18F45K50 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 optional 5V regulator should be 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 :


Bootloader_v4.14_18f45k50_INTOSC.hex is the correct bootloader code for a board running the internal oscillator (INTOSC) without any external crystal.

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
1 MCLR pin 35
2 VDD 5V
3 GND GND
4 PGD pin 7
5 PGC pin 6
6 PGM pin 5

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 also this)

Testing the assembled board

P45k50-05.jpg

Connect a USB cable between your PC and your Pinguino board. The red (power) LED is ON. The bootloader starts and jumps to the user program (if there is any, if not nothing happens).

When the RESET button is pressed, the bootloader waits until a program is uploaded. The yellow (USERLED) LED blinks with a high rate until the user program starts to be received.

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 yellow LED stays lit and then jumps to the user program (if there is any).

Your are ready to play with your board and the Pinguino IDE.

Enjoy !!!

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.

Troubleshooting

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

Pin Out

P45k50 cr.png

Update in progress.

Pin name PCB Label Digital I/O up to 5.5V tolerant Analog input Other Pin on Chip Microchip name
0 D0 Yes Yes SDA / SDI 33 RB0/AN12/INT0/FLT0/SDI/SDA
1 D1 Yes Yes SCL / SCK 34 RB1/AN10/INT1/SCK/SCL
2 D2 Yes Yes 35 RB2/AN8/INT2/VMO
3 D3 Yes Yes SDO see also RC7 36 RB3/AN9/CCP2(1)/VPO
4 D4 Yes Yes 37 RB4/AN11/KBI0/CSSPP
5 D5 Yes Yes 38 RB5/KBI1/PGM
6 D6 Yes Yes ICSP PGC 39 RB6/KBI2/PGC
7 D7 Yes Yes ISCP PGD 40 RB7/KBI3/PGD
8 D8 / A0 Yes Yes Yes 2 RA0/AN0
9 D9 / A1 Yes Yes Yes 3 RA1/AN1
10 D10 / A2 Yes Yes Yes 4 RA2/AN2/VREF-/CVREF
11 D11 / A3 Yes Yes Yes 5 RA3/AN3/VREF+
12 D12 Yes Yes RUN LED / USERLED 6 RA4/T0CKI/C1OUT/RCV
13 D13 / A4 Yes Yes Yes 7 RA5/AN4/SS/HLVDIN/C2OUT
14 D15 14 OSC2/CLKO/RA6
15 D14 13 OSC1/CLKI/RA7
16 D16 Yes Yes 15 RC0/T1OSO/T13CKI
17 D17 Yes Yes PWM 16 RC1/T1OSI/CCP2(1)/UOE
18 D18 Yes Yes PWM 17 RC2/CCP1/P1A
20 D20 USB unplugged 23 RC4/D-/VM
21 D21 USB unplugged 24 RC5/D+/VP
22 D22 Yes Yes Serial TX 25 RC6/TX/CK
23 D23 Yes Yes Serial RX / SDO 26 RC7/RX/DT/SDO
24 D24 Yes Yes 19 RD0/SPP0
25 D25 Yes Yes 20 RD1/SPP1
26 D26 Yes Yes 21 RD2/SPP2
27 D27 Yes Yes 22 RD3/SPP3
28 D28 Yes Yes 27 RD4/SPP4
29 D29 Yes Yes 28 RD5/SPP5/P1B
30 D30 Yes Yes 29 RD6/SPP6/P1C
31 D31 Yes Yes 30 RD7/SPP7/P1D
32 D32 / A5 Yes Yes Yes 8 RE0/AN5/CK1SPP
33 D33 / A6 Yes Yes Yes 9 RE1/AN6/CK2SPP
34 D34 / A7 Yes Yes Yes 10 RE2/AN7/OESPP
OSC1 13 OSC1/CLKI
OSC2 14 OSC2/CLKO/RA6
RESET RST Reset switch / ICSP MCLR 1 MCLR/VPP/RE3
USB- USB 23 RC4/D-/VM
USB+ USB 24 RC5/D+/VP
Vusb USB 18 VUSB
VDD (up to 5.5V) 11 VDD
VDD (up to 5.5V) 32 VDD
VSS (Gnd) 12 VSS
VSS (Gnd) 31 VSS

Fritzing

To do.

How to get one ?

Kits

If you want to get a kit (including the PIC18F45K50 microcontroller with the USB bootloader pre-installed), please go to the Pinguino Shop

Europe VAT zone : 9.90 €

World (ex. VAT) : 8.20 € (about 11 US$)

Shipping cost  : 3.15 €

Blank PCBs

If you just want the PCB with silkscreen to build your own Pinguino 45K50, please go to the Pinguino Shop.

Europe VAT Zone : 6.05 €

World (ex. VAT) : 5.00 €

Shipping cost  : 3.15 €

Pre-programmed PIC18F45K50

If you just want the PIC18F45K50 microcontroller pre-programmed with the Pinguino bootloader to build your own Pinguino 45K50, please go to the Pinguino Shop.

Europe VAT Zone : 6.05 €

World (ex. VAT) : 5.00 €

Shipping cost  : 3.15 €

Personal tools