PIC18F47J53 Pinguino

From Pinguino-Wiki
Jump to: navigation, search
Language: English


Contents

Important Warnings for all Pinguino Users

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

Features

Microcontroller

The Pinguino 47J53A board is built with a Microchip PIC18F47J53 microcontroller and is USB 2.0 compatible.

The characteristics of this microcontroller are:

  • Microcontroller: PIC18F47J53 (TQFP44 package)
  • 128KB Program Flash Memory
  • 3800 RAM Bytes
  • 8 bit 12 MIPS core running at 48MHz
  • 9 nA Deep Sleep mode (Watch Webinar)
  • 200nA Sleep mode (RAM retention)
  • 700nA Real Time Clock & Calendar operation in Sleep modes
  • 330nA Watchdog Timer operation in Sleep modes
  • Integrated full speed USB 2.0
  • Deep Sleep mode ideal for battery applications
  • Peripheral Pin Select for mapping digital peripherals to various I/O for design flexibility
  • Hardware RTCC provides clock, calendar & alarm functions
  • Charge Time Measurement Unit (CTMU) supports capacitive touch screens
  • 3 Enhanced Capture / Compare / PWM modules
  • 2 MSSP serial ports for SPI or I2C™ communication
  • 2 Enhanced USART modules
  • 8-bit Parallel port
  • 3 analog comparators
  • 13 ch, 12-bit ADC
  • Self programming Flash supports 10,000 erase/write cycles and 20 year data retention
  • Operating voltage 2.0 - 3.6V, 5.5V tolerant digital inputs

47J53Diag.jpg

Characteristics of the board

Model A

Preview

  • 1" x 2.3" (2.5 x 5.8 cm)
  • 32 I/O
  • 3 power sources: USB, Ext. Supply (from 4.75V to 12V) or Battery (from 2.8 to 4V - non-regulated to run low power modes).
  • On-board 3.3V regulator
  • Automatic switch between VBAT and USB (or External Power Supply).
  • 8 MHz Crystal
  • 32768 Hz Crystal (for RTCC or extreme low power modes)
  • Breadboard compatible (0.9" between 20-pin headers)
  • ICSP connector
  • Power and User LEDs
  • 4x3mm fixing holes

Revision 1.2

Model B (Pinguino Torda)

Preview

  • Credit card form factor 85.60 mm × 53.98 mm (3.370 in × 2.125 in)
  • 32 I/O
  • 3 power sources: USB, Ext. Supply (up to 12V) or Battery (from 2.8 to 4V - non-regulated to run low power modes).
  • On-board 5V and 3.3V regulators
  • On-board Li-Po battery charger
  • Automatic switch between Battery, USB or External Power Supply
  • Up to 48 MHz processor clock (8 MHz Crystal)
  • 32768 Hz Crystal (for Real Time Clock and Calendar or extreme low power modes)
  • Microchip ICSP connector to use external programmer
  • USB bootloader obviating the need for a programmer device
  • Charge, power and user LEDs
  • 2xUEXT connectors with Serial, SPI and I2C
  • 4x3mm fixing holes

Revision 1.0

Pin Out

Model A

Cheat Sheet

P18F47J53A CheatSheet.png

Pin Table

Pin name PCB Label Digital IO 5.5V tolerant Analog Parallel Port Other Chip Pin Microchip name
00 RB0 Yes No AN12[1] SPI2 CS 8 RB0/AN12/INT0/RP3
01 RB1 Yes No AN10[1] RTCC pin
SPI2 SDO
9 RB1/AN10/RTCC/RP4
02 RB2 Yes No AN8[1] PMA3 SPI2 SCK 10 RB2/AN8/PMA3/RP5
03 RB3 Yes No AN9[1] PMA2 SPI2 SDI 11 RB3/AN9/PMA2/RP6
04 RB4 Yes, PWM CCP4 Yes PMA1 I2C1 SCK
SPI1 SCL
14 RB4/CCP4/PMA1/SCK1/SCL1/RP7
05 RB5 Yes, PWM CCP5 Yes PMA0 I2C1 SDA
SPI1 SDI
15 RB5/CCP5/PMA0/SDI1/SDA1/RP8
06 RB6 Yes, PWM CCP6 Yes ICSP PGC
SPI1 CS
16 RB6/CCP6/PGC/RP9
07 RB7 Yes, PWM CCP7 Yes ICSP PGD 17 RB7/CCP7/PGD/RP10
08 AN0 Yes No AN0 PMA6 19 RA0/AN0/PMA6/RP0
09 AN1 Yes No AN1 PMA7 20 RA1/AN1/PMA7/RP1
10 AN2 Yes No AN2 21 RA2/AN2/Vref-
11 AN3 Yes No AN3 22 RA3/AN3/Vref+
12 AN4 Yes No AN4 24 RA5/AN4/SS/LVDin/RP2
13 AN5 Yes No AN5 PMRD 25 RE0/AN5/PMRD
14 AN6 Yes No AN6 PMWR 26 RE1/AN6/PMWR
15 AN7 Yes No AN7 PMCS 27 RE2/AN7/PMCS
16 RC0 Yes No 32 RC0/T1OSO/T1CKI/RP11
17 RC1 Yes, PWM CCP8 No 35 RC1/CCP8/T1OSI/RP12
18 RC2 Yes No AN11[1] USERLED 36 RC2/AN11/RP13
19 RC3 NC NC NC NC NC NC NC
20 RC4 Input only No USB- I/O 42 RC4/D-/VM
21 RC5 Input only No USB+ I/O 43 RC5/D+/VP
22 RC6 Yes, PWM Yes PMA5 Serial 1 TX 44 RC6/CCP9/PMA5/TX1/CK1/RP17
23 RC7 Yes, PWM Yes PMA4 Serial 1 RX 1 RC7/CCP10/PMA4/RX1/DT1/SDO1/RP18
24 RD0 Yes Yes PMD0 I2C2 SCL -Serial2 TX 38 RD0/PMD0/SCL2
25 RD1 Yes Yes PMD1 I2C2 SDA - Serial2 RX 39 RD1/PMD1/SDA2
26 RD2 Yes Yes PMD2 40 RD2/PMD2/RP19
27 RD3 Yes Yes PMD3 41 RD3/PMD3/RP20
28 RD4 Yes Yes PMD4 2 RD4/PMD4/RP21
29 RD5 Yes Yes PMD5 3 RD5/PMD5/RP22
30 RD6 Yes Yes PMD6 4 RD6/PMD6/RP23
31 RD7 Yes Yes PMD7 5 RD7/PMD7/RP24
GND No 6 VSS
3V3 No 7 VDD
NC 12 NC
NC 13 NC
Reset No Yes Reset switch / ICSP MCLR 18 MCLR
3V3 No 23 VDDCORE/VCAP
3V3 No 28 VDD2
GND No 29 VSS2
OSC1 No 8 MHz crystal 30 RA7/OSC1/CLKI
OSC2 No 8 MHz crystal 31 RA6/OSC2/CLKO
T1OS0 No 32768 Hz crystal 32 RC0/T1OSO/T1CKI/RP11
T1OSI No 32768 Hz crystal 35 RC1/CCP8/T1OSI/RP12
NC 33 NC
NC 34 NC
Vusb No USB voltage input 37 VUSB
  1. 1.0 1.1 1.2 1.3 1.4 Disabled by default (used as digital I/O)

Schematic


Model B (Pinguino Torda)

Cheat Sheet

P18F47J53B CheatSheet.jpg

Pin Table

Pin name PCB Label Digital IO 5.5V tolerant Analog Parallel Port Other Chip Pin Microchip name
D0 D0 Yes No AN12[1] SPI2 CS
Serial2 TX

Servo 0
8 RB0/AN12/INT0/RP3
D1 D1 Yes No AN10[1] RTCC pin
SPI2 SDO
Serial2 RX

Servo 1
9 RB1/AN10/RTCC/RP4
D2 D2 Yes No AN8[1] PMA3 SPI2 SCK
Servo 2
10 RB2/AN8/PMA3/RP5
D3 D3 Yes No AN9[1] PMA2 SPI2 SDI
Servo 3
11 RB3/AN9/PMA2/RP6
D4 D4 Yes Yes PMA1 I2C1 SCK
SPI1 SCL

PWM CCP4
Servo 4
14 RB4/CCP4/PMA1/SCK1/SCL1/RP7
D5 D5/PMA0 Yes Yes PMA0 I2C1 SDA
SPI1 SDI

PWM CCP5
Servo 5
15 RB5/CCP5/PMA0/SDI1/SDA1/RP8
D6 D6 Yes Yes ICSP PGC
SPI1 CS
PWM CCP6
Servo 6
16 RB6/CCP6/PGC/RP9
D7 D7 Yes Yes ICSP PGD
PWM CCP7
Servo 7
17 RB7/CCP7/PGD/RP10
D8 D8 Yes No 32 RC0/T1OSO/T1CKI/RP11
D9 D9 Yes No 35 RC1/CCP8/T1OSI/RP12
D10 D10 Yes No AN11[1] USERLED 36 RC2/AN11/RP13
D11 NC N/C N/C N/C N/C N/C N/C N/C
D12 D12 input only No USB- I/O 42 RC4/D-/VM
D13 D13 input only No USB+ I/O 43 RC5/D+/VP
D14 D14 Yes Yes PMA5 Serial 1 TX
PWM CCP9
44 RC6/CCP9/PMA5/TX1/CK1/RP17
D15 D15 Yes No PMA4 Serial 1 RX
PWM CCP10
1 RC7/CCP10/PMA4/RX1/DT1/SDO1/RP18
D16 A0 Yes No AN0[1] PMA6 19 RA0/AN0/PMA6/RP0
D17 A1 Yes No AN1[1] PMA7 20 RA1/AN1/PMA7/RP1
D18 A2 Yes No AN2[1] 21 RA2/AN2/Vref-
D19 A3 Yes No AN3[1] 22 RA3/AN3/Vref+
D20 A4 Yes No AN4[1] 24 RA5/AN4/SS/LVDin/RP2
D21 A5/PMRD Yes No AN5[1] PMRD 25 RE0/AN5/PMRD
D22 A6/PMWR Yes No AN6[1] PMWR 26 RE1/AN6/PMWR
D23 A7/PMCS Yes No AN7[1] PMCS 27 RE2/AN7/PMCS
D24 P0 Yes Yes PMD0 I2C2 SCL 38 RD0/PMD0/SCL2
D25 P1 Yes Yes PMD1 I2C2 SDA 39 RD1/PMD1/SDA2
D26 P2 Yes Yes PMD2 USERBUTTON 40 RD2/PMD2/RP19
D27 P3 Yes Yes PMD3 41 RD3/PMD3/RP20
D28 P4 Yes Yes PMD4 2 RD4/PMD4/RP21
D29 P5 Yes Yes PMD5 3 RD5/PMD5/RP22
D30 P6 Yes Yes PMD6 4 RD6/PMD6/RP23
D31 P7 Yes Yes PMD7 5 RD7/PMD7/RP24
GND No 6 VSS
3V3 No 7 VDD
NC 12 NC
NC 13 NC
Reset No Yes Reset switch / ICSP MCLR 18 MCLR
3V3 No 23 VDDCORE/VCAP
3V3 No 28 VDD2
GND No 29 VSS2
OSC1 No 8 MHz crystal 30 RA7/OSC1/CLKI
OSC2 No 8 MHz crystal 31 RA6/OSC2/CLKO
T1OS0 No 32768 Hz crystal 32 RC0/T1OSO/T1CKI/RP11
T1OSI No 32768 Hz crystal 35 RC1/CCP8/T1OSI/RP12
NC 33 NC
NC 34 NC
Vusb No USB voltage input 37 VUSB
  1. 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 Disabled by default (used as digital I/O)

Schematic

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.

Electrical Characteristics

Operating conditions at 25°C

Parameter Minimum Typical Maximum Units
Input voltage 4.5 5.0 5.5 Volts
Current Requirement 5 - 500¹ mA

¹ If board is powered via by a USB connection only 500ma is allowable under USB 2.0 specifications.

Power requirements

The Pinguino 47j53 boards can be powered in a number of ways:

  • USB Socket – USB power from a USB Host.
  • USB Socket – Powered by a USB charging/power adapter.
  • VIN pin: 7-12V
  • VBAT pin: 2.8-4V (non-regulated to run low-power battery modes)

3.3V is regulated with AMS1117-3.3 chips.

Warning: If supplying voltage to the VBAT pin ensure this is regulated when not using battery to prevent damage to the PIC.

On-Board Features

System Clocks

An on-board 8 MHz crystal is used to provide the 48MHz system clock for the USB board. An additional 32.768 KHz crystal is also installed for use with the PIC18f47J53 Real time clock (RTCC), 8 bit or 16 bit timers.

Header Pin Outs

12-bit Analog connector

A00 to A07 Pins (D16 to D23) …

Port B (CTMU / Servo / External Interrupt)

D00 to D07 Pins …

Port C

Model A : D24 to D31 Pins …

Model B : D08 to D15 Pins …

Port D (8-bit Parallel Port / Display connector)

Model A : D08 to D15 Pins …

Model B : D24 to D31 Pins …

UEXT connectors (model B only)

(thumbnail)
UEXT pinout

The UEXT connector presents power and three serial buses: Asynchronous serial communication (UART), I²C, Serial Peripheral Interface Bus (SPI). All pins conform to 3.3 volt digital logic. The asynchronous serial bus requires additional level-shifting circuits and connectors to support RS-232, RS-422, RS-485, DMX512, or MIDI.

UEXT Connector
Pin Name I/O Logic Primary Use
1 3.3V S S +3.3V or +5V (according to jumper position)
2 GND S S Ground
3 TX O PP Transmit Data for Async Serial bus
4 RX I PP Receive Data for Async Serial bus
5 SCL O OD Clock for I2C bus
6 SDA I/O OD Bidirectional Serial Data for I2C bus
7 SDI (MISO) I PP Serial Data In for SPI bus
8 SDO (MOSI) O PP Serial Data Out for SPI bus
9 SCK O PP Clock signal for SPI bus
10 CS/SS O PP Chip select|Slave Select for SPI bus

Notes:

  1. Direction is relative to host board. I = Input, O = Output.
  2. S = Power Supply, PP = Push-Pull logic, OD = Open-Drain logic, all pins conform to 3.3 volt digital logic

5V warning

Pinguino Torda boards might provide 5V output on UEXT pins if they are configured to operate at 5V voltage. If the 3.3V/5V jumper is set to 5V - this jumper also changes the voltage available at pin #1 of UEXT and also the voltage levels of all data signals available there (UART, SPI, I2C). Most UEXT modules work at 3.3V – they would get damaged if the board has such jumper set to 5V.

2-pin battery connector

ICSP Connector

There is a provision for 6 pin In-Circuit Serial Programmer (ICSP) connector (male header or female socket) on the board. This is fully compatible with Microchip’s PICkit3 programmer. It is also compatible with the PICkit2 provided you use the device file in this zip file to which device entries for both the PIC18F27J53 and PIC18F47J53 have been added and successfully tested.

ICSP Connector Microchip name Pinguino name
1 MCLR RST
2 VDD 3.3V
3 GND GND
4 PGD B7
5 PGC B6
6 NC NC

Switches/LED indicators

Bootloader

Model A

Model B (2-button bootloader)

How to get one ?

The assembled Pinguino 47j53 Model A boards are NO LONGER available from the Pinguino Shop.

You can get the assembled Pinguino 47j53 Model B aka Pinguino Torda boards from the Pinguino Shop.

Personal tools