Post on 08-Sep-2018
transcript
A compact starter kit with your favorite
microcontroller and two mikroBUS™ sockets
Page 2
I want to express my thanks to you for being interested in our products and for having
confidence in MikroElektronika.
The primary aim of our company is to design and produce high quality electronic products
and to constantly improve the performance thereof in order to better suit your needs.
The PIC® and Windows® logos and product names are trademarks of Microchip Technology® and Microsoft® in the U.S.A. and other countries.
TO OUR VALUED CUSTOMERS
Nebojsa Matic
General Manager
Page 3
Table of contents
Introduction to clicker 2 for PIC18FJ 4
Key features 5
1. Power supply 7
2. PIC18F87J50 microcontroller 9
Key microcontroller features 9
3. Programming the microcontroller 10
3.1 Programming with mikroBootloader 11
step 1 – Connecting clicker 2 for PIC18FJ 11
step 2 – Browsing for .HEX file 12
step 3 – Selecting .HEX file 12
step 4 – Uploading .HEX file 13
step 5 – Finish upload 14
3.2 Programming with mikroProg™ programmer 15
mikroProg Suite™ for PIC® software 16
4. Buttons and LEDs 18
5. Power management and battery charger 20
6. Oscillators 21
7. USB connection 23
8. Pads 25
9. Pinout 26
9.1 mikroBUS™ pinout 27
10. click boards™ are plug and play! 28
11. Dimensions 30
Page 4
clicker 2 for PIC18FJ is a compact dev. kit with two mikroBUS™ sockets for click board connectivity. You can use it to quickly build your own gadgets with unique functionalities and features. It carries the
PIC18F87J50, a 8-bit microcontroller, two
indication LEDs, two general purpose buttons,
a reset button, an on/off switch, a li-polymer
battery connector, a USB Mini-B connector and
two mikroBUS™ sockets. A mikroProg connector
and a 2x26 pinout for interfacing with external
electronics are also provided. The mikroBUS™
connector consists of two 1x8 female headers
with SPI, I2C, UART, RST, PWM, Analog and
Interrupt lines as well as 3.3V, 5V and GND
power lines. clicker 2 for PIC18FJ board can be
powered over a USB cable.
Introduction to clicker 2 for PIC18FJ
Page 5
1 ON/OFF switch
2 Pads for connecting external ON/OFF switch
3 8 MHz crystal oscillator
4 two 1x26 connection pads
5 mikroBUS™ sockets 1 and 2
6 Pushbuttons
7 Additional LEDs
8 LTC3586 USB power manager IC
9 Power and Charge indication LEDs
10 RESET button
11 USB mini-B connector
12 PIC18F87J50
13 PWM selection jumper
14 Li-Polymer battery connector
15 mikroProg™ programmer connector
10
11
12
13
4
5
6
7
14
15
1
2
3
4
5
6
7
9
8
Key features
Page 6
VCC-BAT
CN1BATT CONN
VCC-3.3VAVCCFP1
C1100nF
C22.2uF
R310K
VCC-3.3V
C3100nF
R4
2K2
RESET#
T1
RESET#
VCC-3.3V
12345
HD1
RB6-PGCRB7-PGD
mPROG
C26
10nF
FP2FERRITER24 10K 1
2345 GND
IDD+D-VBUS
CN2
USB MINIB
R251M
USB-D_NUSB-D_P
RE2-GPIO
VCC-USB
RD7-
T2
RE4-
LD2
T2 T3
R510K
R610K
VCC-3.3V VCC-3.3V
R1
2K2
R2
2K2
RD4-
LD1
RH3-
T3
R8470
LD3
VCC-3.3V
J1
RG0-PWM3
RE7-GPIOMB2_PWM
ANRSTCSSCKMISOMOSI3.3VGND
PWMINTRXTX
SCLSDA
5VGND
VCC-3.3V VCC-5V
2
RA1-MB2_AN1
RC5-SPI1_MOSI
RC3-SPI1_SCKRC4-SPI1_MISO RD6-I2C2_SCL
RD5-I2C2_SDA
RB2-MB2_INT2RD0-MB2_RSTRD1-MB2_CS
RC6-UART1_TXRC7-UART1_RX
MB2_PWMANRSTCSSCKMISOMOSI3.3VGND
PWMINTRXTX
SCLSDA
5VGND
VCC-3.3V VCC-5V
1
RA0-MB1_AN0
RC5-SPI1_MOSI
RC3-SPI1_SCKRC4-SPI1_MISO RD6-I2C2_SCL
RD5-I2C2_SDA
RG1-UART2_TXRG2-UART2_RXRB3-MB1_INT3RD2-MB1_RST
RD3-MB1_CS
RG3-MB1_PWM4
RE5-SENSEL
R14100K
R12100K
VCC-BAT
R13100K
C13100nF
M1
DMP2305U
R101M
R11
1K
VCC-BAT
RF6-VSENSE
C622pF
C522pF
X1
8MHz
RD7-
T2
RESET#
OSC1OSC2
R7
R9
USB-D_P
VCC-3.3V
RA2-
AN2
RH5-
AN13
RF2-AN7RH7-AN15
R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C 48
VCC
71
GN
D31
GND 51
GN
D70
AGN
D26
AVCC
25
RB4 54
RJ2 60
RJ3 59
RG38
PIC18F87J50
U1PIC18F87J50
R28R29
RC1-
PWM
2
RE7-
GPI
O
RC0-
GPI
O
HDR1 HDR2
AN
INT
VCC-3.3V
RXTXSCK
SDISDO SDA
SCL
PWM
VCC-3.3V
RB0-INT0RB1-INT1
RC5-SPI1_MOSI
RC3-SPI1_SCKRC4-SPI1_MISO
RE1-GPIO
RG4-PWM5RC2-PWM1
RC6-UART1_TXRC7-UART1_RX
RD6-I2C2_SCLRD5-I2C2_SDA
RG0-PWM3
RJ6-GPIO
RA4-GPIO
RE0-GPIO RB4-GPIORB5-GPIO
RF7-GPIO
RJ7-GPIO
RH2-GPIO
RJ1-GPIORJ0-GPIO
RJ4-GPIO
RJ2-GPIO
RESET#
RH1-GPIO
RH0-GPIO
RB2-MB2_INT2RB3-MB1_INT3
RJ3-GPIO
RC1-PWM2
RA5-GPIO
RA3-GPIO
RF5-AN10
RA2-AN2
RH6-AN14
RF2-AN7
RH4-AN12RH5-AN13
RH7-AN15
RC0-GPIORE3-GPIO
VSYS
RE6-FAULT
RJ5-STAT
ILIM
01
ILIM
12
LDO
3V3
3
CLPR
OG
4
NTC
5
VOU
T46
VOU
T47
SW4
8
MO
DE
9
FB4
10
FB3
11
VC3
12
SWAB3 13VIN3 14VIN3 15VOUT3 16VOUT3 17EN3 18SWCD3 19
EN2
20EN
121
VIN
422
FB2
23VI
N2
24SW
225
SW1
26VI
N1
27FB
128
PRO
G29
CHRG
#30
GAT
E31
BAT32
EN433
VOUT34
VBUS35
VBUS36
SW37
FAULT#38
LTC3586
U2LTC3586
L1 3.3uHL2 2.2uH
M2
DMP2305U
R15
2K2
C22
22uF
C31
22uF
VCC-USB
VCC-USB
C32
10uF
VCC-3.3V
C23 10pF
R21
15K
C24
300pF
R19324K
R22105K
C14
22uF
C21
33pF
VCC-3.3VVCC-3.3V
VCC-3.3V
C19
2.2uF
L32.2uH
R2716K9
C29
10pF
C30
22uF
VCC-5V
VCC-5V VCC-5V VCC-5V
R18
3K3
R2688K7
C25100nF
R231K69
LD4BRED
LDO3V3
C17
1uF
LDO3V3
PWR-ENPWR-EN
C20
2.2uF
VCC-BAT
R20
10KVCC-3.3V
1
2
3
SW1JS202011AQN
PWR-ENC18
100nF
LDO3V3
C15
1uF
VCC-3.3V
C27
1uF
VCC-5V
C28
10nF
VCC-5V
C16
10nF
VCC-3.3V
R16
10K
LDO3V3LDO3V3
VCC-USB
R171M
VSYS
VSYS VSYS
VSYS
C8
100nF
C9
100nF
C10
100nF
C12
100nF
VCC-3.3V VCC-3.3V VCC-3.3VVCC-3.3V
C11
100nF
VCC-3.3V
C7
10uF
VCC-3.3V VCC-3.3V
C33
10uF
VCC-BAT
C34
2.2uF
clicker 2 for PIC18FJ schematic
Page 7
1. Power supply
You can supply power to the board with a Mini-B USB cable
provided in the package. On-board voltage regulators provide
the appropriate voltage levels to each component on the board.
Power LED (GREEN) will indicate the presence of power supply.
You can also power the board using a Li-Polymer battery, via on-
board battery connector. On-board battery charger circuit enables
you to charge the battery over USB connection. LED diode (RED) will indicate when battery is charging. Charging current is
~300mA and charging voltage is 4.2V DC.
Battery power supply
USBpower supply
Figure 1-1: Connecting USB power supply
Figure 1-2: Connecting Li-Polymer battery
Some click boards need more current than the USB connection can supply. For 3.3V clicks, the upper limit is 750 mA; for 5V clicks,
it’s 500 mA. In those cases you would need to use the battery as the power supply, or the vsys pin on the side of the board.
NOTE
Page 8
Figure 1-3: Power supply schematic
VCC-3.3VAVCCFP1
C1100nF
C22.2uF
C26
10nF
FP2FERRITE
12345 GND
IDD+D-VBUS
CN2
USB MINIB
VCC-USB
R8470
LD3
VCC-3.3V
RE5-SENSEL
R14100K
R12100K
VCC-BAT
R13100K
C13100nF
M1
DMP2305U
R101M
R11
1K
VCC-BAT
RF6-VSENSE
HDR1 HDR2
AN
INT
VCC-3.3V
RXTXSCK
SDISDO SDA
SCL
PWM
VCC-3.3V
VSYS
RE6-FAULT
RJ5-STAT
ILIM
01
ILIM
12
LDO
3V3
3
CLPR
OG
4
NTC
5
VOU
T46
VOU
T47
SW4
8
MO
DE
9
FB4
10
FB3
11
VC3
12
SWAB3 13VIN3 14VIN3 15VOUT3 16VOUT3 17EN3 18SWCD3 19
EN2
20EN
121
VIN
422
FB2
23VI
N2
24SW
225
SW1
26VI
N1
27FB
128
PRO
G29
CHRG
#30
GAT
E31
BAT32
EN433
VOUT34
VBUS35
VBUS36
SW37
FAULT#38
LTC3586
U2LTC3586
L1 3.3uHL2 2.2uH
M2
DMP2305U
R15
2K2
C22
22uF
C31
22uF
VCC-USB
VCC-USB
C32
10uF
VCC-3.3V
C23 10pF
R21
15K
C24
300pF
R19324K
R22105K
C14
22uF
C21
33pF
VCC-3.3VVCC-3.3V
VCC-3.3V
C19
2.2uF
L32.2uH
R2716K9
C29
10pF
C30
22uF
VCC-5V
VCC-5V VCC-5V VCC-5V
R18
3K3
R2688K7
C25100nF
R231K69
LD4BRED
LDO3V3
C17
1uF
LDO3V3
PWR-ENPWR-EN
C20
2.2uF
VCC-BAT
R20
10KVCC-3.3V
1
2
3
SW1JS202011AQN
PWR-ENC18
100nF
LDO3V3
C15
1uF
VCC-3.3V
C27
1uF
VCC-5V
C28
10nF
VCC-5V
C16
10nF
VCC-3.3V
R16
10K
LDO3V3LDO3V3
VCC-USB
R171M
VSYS
VSYS VSYS
VSYS
C8
100nF
C9
100nF
C10
100nF
C12
100nF
VCC-3.3V VCC-3.3V VCC-3.3VVCC-3.3V
C11
100nF
VCC-3.3V
C7
10uF
VCC-3.3V VCC-3.3V
C33
10uF
VCC-BAT
CN1BATT CONN
VCC-BAT
C34
2.2uF
Page 9
2. PIC18F87J50 microcontroller
The clicker 2 for PIC18FJ development tool comes with the
PIC18F87J50 device. This 8-bit low power high performance
microcontroller is rich with on-chip peripherals and features
128 KB of program memory and 3094 bytes of RAM. It has
integrated full speed USB 2.0. support.
Key microcontroller features- Up to 12 MIPS operation
- 8-bit architecture
- 128 KB of program memory
- 3,904 bytes of RAM
- 65 I/O pins
- Internal oscillator 8 MHz, 32 Khz
- 2-UART, 2-SPI, 2-I2C, USB 2.0, DAC, ADC etc.
Data/Memory Bus
Data Bus
PIC18FJ
12 MIPS 8-bit Core- nanoWatt- 48MHz
31 LevelStack
ProgramCounter
Instruction Data
PMP Timers Comparators ADC10-Bit EUSART CCP MSSP
Flash(Up to 128KB)
RAM(Up to 3.9KB) VREG
DataAddress
AddresseDecode
USB
01
02
03
Using USB HID mikroBootloader,
Using external mikroProg™ for PIC18FJ programmer
Using external ICD2/3® programmer
Figure 3-1:PIC18F87J50
microcontroller
The microcontroller can be programmed in three ways:
3. Programming the microcontroller
Page 10
Page 11
You can program the microcontroller with a
bootloader which is preprogrammed by default.
To transfer .hex file from a PC to MCU you need
bootloader software (mikroBootloader USB HID)
which can be downloaded from:
3.1 Programming with mikroBootloader
Figure 3-2: USB HID mikroBootloader window
step 1 – Connecting clicker 2 for PIC18FJ
01
01
To start, connect the USB cable, or if already connected press the Reset button on your clicker 2 for PIC18FJ. Click the Connect button within 5s to enter the bootloader mode, otherwise existing microcontroller program will execute.
After the mikroBootloader software is downloaded,
unzip it to desired location and start it.
http://www.mikroe.com/downloads/get/2156/clicker_2_pic18fj_bootloader.zip
clicker 2 for PIC18FJ BootloaderWinRAR ZIP archive
clicker 2 for PIC18FJ BootloaderFile folder
SoftwareFile folder
mikroBootloader USB HID.exeBootloader tool for mikroElektron...mikroElektronika
clicker 2 for PIC18FJ P18F87J50 USB HID Bootloader v1.300.hexHEX File
FirmwareFile folder
Page 12
step 3 – Selecting .HEX file step 2 – Browsing for .HEX file
Figure 3-3: Browse for HEX Figure 3-4: Selecting HEX
01 01
02
01
01
02
Click the Browse for HEX button and from a
pop-up window (Figure 3.4) choose the .HEX file
which will be uploaded to MCU memory.
Select .HEX file using open dialog window.
Click the Open button.
Page 13
step 4 – Uploading .HEX file
Figure 3-5: Begin uploading Figure 3-6: Progress bar
01
01
01 01To start .HEX file bootloading click the Begin uploading button.
Progress bar enables you to monitor .HEX file uploading.
Page 14
step 5 – Finish upload
Figure 3-7: Restarting MCU Figure 3-8: mikroBootloader ready for next job
01
01
02
Click OK button after the uploading process is finished.
Press Reset button on clicker 2 for PIC18FJ board and
wait for 5 seconds. Your program will run automatically.
The microcontroller can be programmed with external
mikroProg™ for PIC programmer and mikroProg Suite™
for PIC® software. The external programmer is connected
to the development system via 1x5 connector Figure 3-9. mikroProg™ is a fast USB 2.0 programmer with
hardware debugger support. It supports PIC10®,
dsPIC30/33®, PIC24® and PIC32® devices
in a single programmer. It supports over
570 microcontrollers from Microchip®.
Outstanding performance, easy operation
and elegant design are its key features.
3.2 Programming with mikroProg™ programmer
Figure 3-9: mikroProg™
connector
Page 15
You can also
program it
with ICD2®
or ICD3® if
you reroute
the wires like
shown here.
4. G
ND
5. V
CC 3
.3V
6. M
CLR
#
2. P
GC3.
PGD
1. N
C GN
DM
CLR
#PG
DPG
CV
CC 3
.3V
ICD2/3programmer
clicker 2 forPIC18FJ 1x5programmingheaders
mikroProg Suite™ for PIC® software
mikroProg™ programmer requires
special programming software called
mikroProg Suite™ for PIC®. This
software is used for programming
of ALL Microchip® microcontroller
families, including PIC10®, PIC12®,
PIC16®, PIC18®, dsPIC30/33®,
PIC24® and PIC32®. Software has
intuitive interface and SingleClick™
programming technology. Just by
downloading the latest version of
mikroProg Suite™ your programmer
is ready to program new devices.
mikroProg Suite™ is updated
regularly, at least four times a year,
so your programmer will be more and
more powerful with each new release.
Figure 3-10: Main window of mikroProg Suite™ for PIC® programming software
Page 16
Page 17
RESET#
VCC-3.3V
12345
HD1
RB6-PGCRB7-PGD
mPROG
C622pF
C522pF
X1
8MHz
RESET#
OSC1OSC2
VCC-3.3V
RB6-PGC
RB7-PGD
AVCC
C4
10uF
RA0
30RA
129
RA2
28
RC0
36
RH1
80
RA5
33
RB0 58
RB1 57
RB2 56
RB3 55
RH21
RE13
RB6 52
RJ1
61
RF713
RC1
35
RE7
73
RC3 44RC4 45RC5 46
RC6
37
RC7
38
MCLR9
CLKI/RA7/OSC1 49CLKO/RA6/OSC2 50GND11
VCCcore/Vcap12
VCC
32
RD2
68
RD0
72
RD3
67
RD1
69
RH5
21
RD5
65
RD6
64
RE04
RE2
78
RA4
34
RJ7 42
RB5 53
VBAT
24VU
SB23
RF218 RF3/D-17 RF4/D+16 RF515 RF614
RH0
79
RC2 43
RG16
RG27
RG410
RG05
RD4
66
RE3
77
RJ6 41
RJ4
39
RH4
22
RE6
74
RH620 RH719
RA3
27
RJ0
62
RB7 47
RE5
75RE
476
RJ5
40
RD7
63
RH32
VCC 48
VCC
71
GN
D31
GND 51
GN
D70
AGN
D26
AVCC
25
RB4 54
RJ2 60
RJ3 59
RG38
PIC18F87J50
U1PIC18F87J50
C8
100nF
C9
100nF
C10
100nF
C12
100nF
VCC-3.3V VCC-3.3V VCC-3.3VVCC-3.3V
C11
100nF
VCC-3.3V
C7
10uF
VCC-3.3V VCC-3.3V
C33
10uF
VCC-3.3VAVCCFP1
C1100nF
C22.2uF
Page 17
Before attaching the programming connector, you have to solder the provided 1x5 male header to the programming pads (HD1).
Figure 3-11: mikroProg™ connection schematic
NOTE
Page 18
Figure 4-1: Two LEDs, two buttons and a reset button
4. Buttons and LEDs
The board also contains a 01 reset button
and a pair of 02 buttons and 03
LEDs, as well as an ON/
OFF switch. The Re-set button is used
to manually reset
the microcontroller—it
generates a low voltage
level on the microcontrol-
ler’s reset pin. LEDs can be
used for visual indication of
the logic state on two pins (RD4
and RE4). An active LED indicates
that a logic high (1) is present on the
pin. Pressing any of the two buttons can
change the logic state of the microcontroller
pins (RD7 and RH3) from logic high (1) to log-
ic low (0). In addition to the onboard ON/OFF
switch, two pads (EXT and PSW) allow you to
connect your own external switch.
03 02 01
Page 19
Figure 4-2: Other modules connection schematic
R310K
VCC-3.3V
C3
100nF
R4
2K2
RESET#
T1
RD7-
T2
RE4-
LD2
T2 T3
R510K
R610K
VCC-3.3V VCC-3.3V
R1
2K2
R2
2K2
RD4-
LD1
RH3-
T3
C622pF
C522pF
X1
8MHz
RD7-
T2
RESET#
OSC1OSC2
VCC-3.3V
RE4-
LD2
AVCC
RH3-T3
RD4-
LD1
C4
10uF
RA0
30RA
129
RA2
28
RC0
36
RH1
80
RA5
33
RB0 58
RB1 57
RB2 56
RB3 55
RH21
RE13
RB6 52
RJ1
61
RF713
RC1
35
RE7
73RC3 44RC4 45RC5 46
RC6
37
RC7
38
MCLR9
CLKI/RA7/OSC1 49CLKO/RA6/OSC2 50GND11
VCCcore/Vcap12
VCC
32
RD2
68
RD0
72
RD3
67
RD1
69
RH5
21
RD5
65
RD6
64
RE04
RE2
78
RA4
34
RJ7 42
RB5 53
VBAT
24VU
SB23
RF218 RF3/D-17 RF4/D+16 RF515 RF614
RH0
79
RC2 43
RG16
RG27
RG410
RG05
RD4
66
RE3
77
RJ6 41
RJ4
39
RH4
22
RE6
74
RH620 RH719
RA3
27
RJ0
62
RB7 47RE
575
RE4
76
RJ5
40
RD7
63
RH32
VCC 48
VCC
71
GN
D31
GND 51
GN
D70
AGN
D26
AVCC
25
RB4 54
RJ2 60
RJ3 59
RG38
PIC18F87J50
U1PIC18F87J50
C9
100nF
C10
100nF
VCC-3.3V VCC-3.3V
C8
100nF
VCC-3.3VVCC-3.3V
C7
10uF
C12
100nF
C11
100nF
VCC-3.3V VCC-3.3V VCC-3.3V
C33
10uF
VCC-3.3VAVCCFP1
C1100nF
C22.2uF
Page 20
5. Power management and battery charger
clicker 2 for PIC18FJ features
LTC®3586-2, a highly integrated
power management and battery
charger IC that includes a current
limited switching PowerPath manager.
LTC®3586 also enables battery charging over a USB connection.
Figure 5-1: power management and battery charger IC
Page 21
6. Oscillators
Board is equipped
with 8MHz crystal oscillator (X1) circuit
that provides external clock
waveform to the microcontroller
CLKO and CLKI pins. This base
frequency is suitable for further clock
multipliers and ideal for generation of
necessary USB clock, which ensures proper
operation of bootloader and your custom
USB-based applications.
Figure 6-1:8MHz crystal
oscillator module (X1)
Page 22
C622pF
C522pF
X1
8MHz
OSC1OSC2
VCC-3.3V
AVCC
RA0
30RA1
29RA2
28
RC0
36
RH
180
RA5
33
RB0 58
RB1 57
RB2 56
RB3 55
RH21
RE13
RB6 52
RJ1
61
RF713
RC1
35
RE7
73RC3 44RC4 45RC5 46
RC6
37
RC7
38
MCLR9
CLKI/RA7/OSC1 49CLKO/RA6/OSC2 50GND11
VCCcore/Vcap12
VCC
32
RD
268
RD
072
RD
367
RD
169
RH
521
RD
565
RD
664
RE04
RE2
78
RA4
34
RJ7 42
RB5 53
VBAT
24VU
SB23
RF218 RF3/D-17 RF4/D+16 RF515 RF614
RH
079
RC2 43
RG16
RG27
RG410
RG05
RD
466
RE3
77
RJ6 41
RJ4
39
RH
422
RE6
74
RH620 RH719
RA3
27
RJ0
62
RB7 47
RE5
75RE4
76
RJ5
40
RD
763
RH32
VCC 48
VCC
71
GN
D31
GND 51
GN
D70
AGN
D26
AVCC
25
RB4 54
RJ2 60
RJ3 59
RG38
PIC18F87J50
U1PIC18F87J50
C9
100nF
C10
100nF
VCC-3.3V VCC-3.3V
C8
100nF
VCC-3.3VVCC-3.3V
C7
10uF
C12
100nF
C11
100nF
VCC-3.3V VCC-3.3V VCC-3.3V
C33
10uF
VCC-3.3VAVCCFP1
C1100nF
C22.2uF
The use of crystal in all other schematics is implied even if it is purposely left out, because of the schematics clarity.
Figure 6-2: Crystal
oscillator schematic
NOTE
PIC18F87J50 microcontrollers has an integrated USB module, which
enables you to implement USB communication functionality to your clicker 2
board. Connection with target USB host is done over a Mini-B USB connector
which is positioned next to the battery connector.
7. USB connection
Figure 7-1: Connecting USB cable to clicker 2
Page 23
Page 24
C622pF
C522pF
X1
8MHz
OSC1OSC2
USB-D_P
VCC-3.3V
RE2-
GPI
O
USB-D_N
AVCC
C4
10uFRA
030
RA1
29RA
228
RC0
36
RH1
80
RA5
33
RB0 58
RB1 57
RB2 56
RB3 55
RH21
RE13
RB6 52
RJ1
61
RF713
RC1
35
RE7
73
RC3 44RC4 45RC5 46
RC6
37
RC7
38
MCLR9
CLKI/RA7/OSC1 49CLKO/RA6/OSC2 50GND11
VCCcore/Vcap12
VCC
32
RD2
68
RD0
72
RD3
67
RD1
69
RH5
21
RD5
65
RD6
64
RE04
RE2
78
RA4
34RJ7 42
RB5 53
VBAT
24VU
SB23
RF218 RF3/D-17 RF4/D+16 RF515 RF614
RH0
79
RC2 43
RG16
RG27
RG410
RG05
RD4
66
RE3
77
RJ6 41
RJ4
39
RH4
22
RE6
74
RH620 RH719
RA3
27
RJ0
62
RB7 47
RE5
75RE
476
RJ5
40
RD7
63
RH32
VCC 48
VCC
71
GN
D31
GND 51
GN
D70
AGN
D26
AVCC
25
RB4 54
RJ2 60
RJ3 59
RG38
PIC18F87J50
U1PIC18F87J50
R28R29
C8
100nF
C9
100nF
C10
100nF
C12
100nF
VCC-3.3V VCC-3.3V VCC-3.3VVCC-3.3V
C11
100nF
VCC-3.3V
C7
10uF
VCC-3.3V VCC-3.3V
C33
10uF
C26
10nF
FP2FERRITER24 10K 1
2345 GND
IDD+D-VBUS
CN2
USB MINIB
R251M
USB-D_NUSB-D_P
RE2-GPIO
VCC-USB
VCC-3.3VAVCC
FP1
C1100nF
C22.2uF
Figure 7-2: USB module connection schematic
Page 25
C6
22pF
C5
22pF
X1
8MHz
RESET#
OSC1OSC2
R7
R9
VCC-3.3V
RA2-
AN2
RH5-
AN13
RF2-AN7RH7-AN15
RH4-
AN12
RH6-AN14
RB0-INT0RB1-INT1
RB2-MB2_INT2RB3-MB1_INT3
RE1-GPIO
RC3-SPI1_SCKRC4-SPI1_MISORC5-SPI1_MOSI
RC2-PWM1
RG4-PWM5
RA5-
GPI
O
RE3-
GPI
O
RG0-PWM3
RC7-
UAR
T1_R
XRC
6-U
ART1
_TX
RD6-
I2C2
_SCL
RD5-
I2C2
_SD
A
RF5-AN10
RA1-
MB2
_AN
1RA
0-M
B1_A
N0
RJ6-GPIO
RE0-GPIO
RB4-GPIORB5-GP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O
RB2-MB2_INT2RB3-MB1_INT3RA3-GPIO
RF5-AN10
RA2-AN2
RH6-AN14
RF2-AN7
RH4-AN12RH5-AN13
RH7-AN15
RC0-GPIORE3-GPIO
VSYS
C8
100nF
C9
100nF
C10
100nF
C12
100nF
VCC-3.3V VCC-3.3V VCC-3.3VVCC-3.3V
C11
100nF
VCC-3.3V
C7
10uF
VCC-3.3V VCC-3.3V
C33
10uF
VCC-3.3VAVCCFP1
C1100nF
C22.2uF
8. Pads
Most microcontroller pins are available for further connectivity via two 1x26 rows of connection
pads on both sides of the clicker 2 for PIC18FJ board. They are designed to match additional
shields, such as Battery Boost shield, Gaming, PROTO shield and others.
Pads HDR2 Pads HDR1Figure 8-1: Connecting pads schematic
Page 26
SPI LinesInterrupt LinesAnalog LinesDigital lines I2C Lines UART lines PWM lines
9. PinoutVSYSRSTReset pin System power supplyGNDGNDReference Ground Reference GroundRA2RH5RH4RC1RH6RC2RH7RG4RF2RG0RF5RH0RB1RA4RB0RJ7RB2RJ6RB3RJ4RA3RB5RE0RB4RH2RJ2RE1RJ3RH1RA5RC0RJ0RE3RJ1RF7RC7RC3RC6RC4RD6RC5RD53.3V3.3V3.3V power supplyGNDGNDReference Ground
Pin functions Pin functions
Digital I/O lines
SPI1 Lines
Interrupt Lines
Analog Lines
RXTX SCK
SCL SDISDA SDO
UART1 Lines
I2C2 Lines
PWM lines
Digital I/O lines
3.3V power supplyReference Ground
RC7RB2RG0
RG2
RG3
RC6
RG1
RB3
RD6
5V
RD6
5V
RD5
RD5
RD5
GND
RXInterrupt linePWM line
RX
PWM line
TX
TX
Interrupt line
SCL
5V power supply
SCL
5V power supply
SDA
Reference ground
SDA
Reference ground
UART1 lines
UART2 lines
I2C2 lines
I2C2 lines
RC3
RA1
RC3
RA0
3.3V
RC4
3.3V
RD0
RC4
RD2
GND
RC5
GND
RD1
RC5
RD3
SPI1lines
SPI1lines
SCK
Analog line
SCK
Analog line
3.3V power supply
MISO
3.3V power supply
MISO
Digital lines*
Reference ground
MOSI
Reference ground
MOSI
Figure 9-1: mikroBUS™ individual and shared lines
9.1 mikroBUS™ pinouts
clicker 2 for PIC18FJ employs a solution to optimize
the use of available pins and MCU I/Os. The PWM SEL jumper (Figure 9-2) enables two modes of
use for the second available PWM line:
1 The default position of the jumper is for
applications when you’re not using the PWM line on
the 1x26 pinout on the right side of the board. This
keeps this PWM available through mikroBUS™ 2
2 If you resolder the jumper into the second
position, it would turn the PWM line on mikroBUS™
2 into a GPIO. You would use this in scenarios
where you already utilized the PWM through the
1x26 pinout (which would make the PWM pin on
mikroBUS™ 2 unusable)
Digital lines*
Figure 9-2:
PWM SEL jumper
Page 27
Up to now, MikroElektronika has
released more than 90 mikroBUS™
compatible click boards™. On
the average, one click board
is released per week. It is our
intention to provide you with as
many add-on boards as possible,
so you will be able to expand your
development board with additional
functionality. Each board comes
with a set of working example
code. Please visit the click boards™
webpage for the complete list of
currently available boards:
10. click boards™ are plug and play!
Figure 10-1: clicker 2 for PIC18FJ driving click boards™
Page 28
www.mikroe.com/click
Page 29
Relay click
Gyro click LightHz click7seg click
Bluetooth2 click
EEPROM clickTHERMO click
RFid click Thunder click
Pressure click
8x8 click FM click
BarGraph click
USB SPI click
Page 30
11. Dimensions
Page 31
DISCLAIMER
All the products owned by MikroElektronika are protected by copyright law and international copyright treaty. Therefore, this manual is to be treated as any other copyright material. No part of this manual, including product and software described herein, may be reproduced, stored in a retrieval system, translated or transmitted in any form or by any means, without the prior written permission of MikroElektronika. The manual PDF edition can be printed for private or local use, but not for distribution. Any modification of this manual is prohibited.
MikroElektronika provides this manual ‘as is’ without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties or conditions of merchantability or fitness for a particular purpose.
MikroElektronika shall assume no responsibility or liability for any errors, omissions and inaccuracies that may appear in this manual. In no event shall MikroElektronika, its directors, officers, employees or distributors be liable for any indirect, specific, incidental or consequential damages (including damages for loss of business profits and business information, business interruption or any other pecuniary loss) arising out of the use of this manual or product, even if MikroElektronika has been advised of the possibility of such damages. MikroElektronika reserves the right to change information contained in this manual at any time without prior notice, if necessary.
TRADEMARKS
The MikroElektronika name and logo, mikroC™, mikroBasic™, mikroPascal™, Visual TFT™, Visual GLCD™, mikroProg™, Ready™, MINI™, mikroBUS™, EasyPIC™, EasyAVR™, Easy8051™, click boards™ and mikromedia™ are trademarks of MikroElektronika. All other trademarks mentioned herein are property of their respective companies.All other product and corporate names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies, and are only used for identification or explanation and to the owners’ benefit, with no intent to infringe.
Copyright © 2014 MikroElektronika. All Rights Reserved.
HIGH RISK ACTIVITIES
The products of MikroElektronika are not fault – tolerant nor designed, manufactured or intended for use or resale as on – line control equipment in hazardous environments requiring fail – safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines or weapons systems in which the failure of Software could lead directly to death, personal injury or severe physical or environmental damage (‘High Risk Activities’). MikroElektronika and its suppliers specifically disclaim any expressed or implied warranty of fitness for High Risk Activities.
If you want to learn more about our products, please visit our web site at www.mikroe.com
If you are experiencing some problems with any of our products or just need additional
information, please place your ticket at www.mikroe.com/support
If you have any questions, comments or business proposals,
do not hesitate to contact us at office@mikroe.com
___ver.
100a