Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
A compact starter kit with your favorite microcontroller and two mikroBUS™ sockets
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.
To our valued customers
Nebojsa Matic
General Manager
Page 3
Table of Contents
Introduction to Clicker 2 for PIC32MZ 4
Key features 5
2. PIC32MZ microcontroller 7
3. Programming the microcontroller 8
3.1 Programming with mikroBootloader 9
step 1 – Connecting Clicker 2 9
step 2 – Browsing for .HEX file 10
step 3 – Selecting .HEX file 10
step 4 – Uploading .HEX file 11
step 5 – Finish upload 12
3.2 Programming with mikroProg
programmer 13
mikroProg Suite software 14
4. Buttons and LEDs 15
5. Power management and battery charger 16
6. Oscillators 17
7. USB connection 18
8. Pinout 19
9. click boards™ are plug and play! 20
10. Dimensions 21
Page 4
Introduction to Clicker 2 for PIC32MZ
power supplyvia USB cable (5V DC)
board dimensions60.4 x 81 mm (2.4 x 3.2 inch)
weight48 g (0.105 lbs)
Clicker 2 for PIC32MZ is a compact development
kit with two mikroBUSTM sockets for click boardTM
connectivity. You can use it to quickly build
your own gadgets with unique functionalities
and features. It carries the PIC32MZ 32-bit
microcontroller, two indication LEDs, two general
purpose buttons, a reset button, an ON/OFF
switch, a li-polymer battery connector, a micro
USB connector and two mikroBUSTM sockets.
A mikroProg connector and a 2x26 pinout for
interfacing with external electronics are also
provided. The mikroBUSTM connector consists of
two 1x8 female headers with SPI, I 2C, UART, RST,
PWM, Analog and Interrupt lines as well as 3.3V, 5V
and GND power lines. clicker 2 for PIC32MZ board
can be powered over a USB cable.
Page 5
1 2
8
10
11
3
9
13
4 4
5 5
6 6
12
7
1 ON/OFF switch
2 Reset button
3 PIC32MZ MCU
4 mikroBUS™ sockets 1 and 2
5 Pushbuttons
6 Additional LEDs
7 Indication LEDs
8 Micro USB connector
9 32.768 KHz Crystal
10 Battery connector
11 mikroProg connector
12 LTC3568 USB power manager IC
13 24MHz Crystal Oscillator
Key Features
Page 6
VCC-3.3V
1
VCC-3.3V
2
ANRSTCSSCKMISOMOSI3.3VGND
PWMINTRXTX
SCLSDA
5VGND
MIKROBUS 1
MIKROBUS HOST CONN
ANRSTCSSCKMISOMOSI3.3VGND
PWMINTRXTX
SCLSDA
5VGND
MIKROBUS 2
MIKROBUS HOST CONN
VCC-BAT VCC-BATVCC-BAT VCC-3.3VVCC-BAT
R510k
R610k
R101M
R12100k
R13100k
R14100k
C33
0.1µF
R11
1k R8470
LD1LD2
C36
10µF
32
1M1
DMP2305U-7
R1
1k
R2
1k
456
123
91011
78
12131415
181920
1617
2122
26
232425
HDR1
456
123
91011
78
12131415
181920
1617
2122
26
232425
HDR2
AN
INT
SPI
PWM
SCL
RX
VCC-3.3V VCC-3.3V
GPIO
GPIO
VCC-3.3V VCC-3.3V
VCC-USBVCC-USBVCC-3.3V
VCC-3.3V
VCC-3.3V
VCC-3.3V
VCC-5V VCC-5V VCC-5V VCC-5V
LDO3V3
LDO3V3
VCC-BATVCC-3.3V
VCC-5V VCC-5V
VCC-3.3V
LDO3V3
LDO3V3
VCC-USB
VSYS
VSYS VSYS
VSYS
LDO3V3
PWR-EN
LDO3V3
R152.2k
R16
10kR183.3k
R20
10k
R171k
C18
0.1µF
R2716.9k
R23 1.69k
R2688.7k
R21
15k
R22105k
R19324k
C250.1µF
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
U2LTC3586EUFE
C15
1µF
C17
1µF
C16
10000pF
C14
22µFC31
22µF
C30
22µF
C27
1µF
C28
10000pFC32
10µF
C29
10pFC19
2.2µF
C20
2.2µF
32
1
M2
DMP2305U-7
L32.2µH
L2
2.2µH
L1 3.3µH
C24
300pF
C21
33pFC23
10pF
C22
47µF
D_ND_PR35 27
R34 27
12345 ID
D+D-VBUS
GND
CN2
uUSB
FP2
C26
10000pF
USBD_NUSBD_P
R3010k
C4
0.1µF
VSYS
VCC-3.3V
TX
SDA
T2T3
VSYS
21
J2
SHM1x2
1
2
3
4
5
6SW1
T145
123
J1
M1X5
#MCLR
VCC-3.3V
RG151
RA52
RE53
RE64
RE75
RC16
RC27
RC38
RC49
RG610
RG711
RG812
VSS13
VDD14
MCLR15
RG916
RA017
RE818
RE919
RB520
RB421
RB322
RB223
RB124
RB025
RB6
26
RB7
27
RA9
28
RA10
29
AVD
D30
AVSS
31
RB8
32
RB9
33
RB10
34
RB11
35
VSS
36
VDD
37
RA1
38
RF13
39
RF12
40
RB12
41
RB13
42
RB14
43
RB15
44
VSS
45
VDD
46
RD14
47
RD15
48
RC12
49
RC15
50
VBUS 51VUSB3V3 52VSS 53D- 54D+ 55RF3 56RF2 57RF8 58RA2 59RA3 60RA4 61VDD 62VSS 63RF4 64RF5 65RA14 66RA15 67RD9 68RD10 69RD11 70RD0 71RC13 72RC14 73VDD 74VSS 75
RD1
76RD
277
RD3
78RD
1279
RD13
80RD
481
RD5
82VD
D83
VSS
84RF
085
RF1
86RG
187
RG0
88RA
689
RA7
90RE
091
VSS
92VD
D93
RE1
94RG
1495
R G12
96RG
1397
RE2
98RE
399
RE4
100
U1
PIC32MZ2048EFH100-250I/PF
FB1
FERRITE
VCC-3.3V
STANDBY 1
GND 2OUT3
VCC4
Y2
24MHz
GND
CLK_IN
GND
VCC-3.3V
STAND-BY1
GND2 OUT 3
VCC 4Y1
32.768kHz
SCLK_IN
VCC-3.3V
GND
USBD_NUSBD_P
R4 1k
VCC-USB
VBUS
VBUS#MCLR
#MCLR
RB6/
PGEC
2RB
7/PG
ED2
R3 1k
PWR-EN
R71M
TVS1 TVS2
RF2/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
RB8/AN48
PWR-EN
RE1/GPIO
RG14/GPIORG12/GPIO
RE2/GPIO
RG15/GPIORA5/GPIORE5/GPIORE6/GPIO
RA6/GPIORA7/GPIORE0/GPIO
RD0/GPIORA4/GPIO
RE4/
GPI
O
RE4/GPIO
RA9/
GPI
O
RB0/
GPI
O
RA0/GPIO
RG9/GPIO
RC3/
GPI
O
RE7/
GPI
O
C3
0.10µF
C5
0.10µF
C6
0.10µF
C20.10µF
C1
0.10µF
C7
0.10µF
C8
0.10µF
C9
0.10µF
C10
0.10µF
C11
0.10µF
C12
10µF
VCC-3.3V
GND
RD13
/GPI
O
RD13/GPIO
VCC-5V VCC-5V
RB6/PGEC2RB7/PGED2
RG13/GPIO
Clicker 2 for PIC32MZ schematic
Page 7
2. PIC32MZ microcontrollerThe Clicker 2 for PIC32MZ development tool comes with
the PIC32MZ microcontroller. This 32-bit (up to 1 MB
Live- Update Flash and 512 KB SRAM) microcontroller
with FPU is rich with on-chip peripherals.
∫ 1MB of Live-Update flash
∫ Core: 200MHz
∫ Nine 16-bit or up to four 32-bit timers/counters
∫ 5V-tolerant pins with up to 32 mA source/sink
Key microcontroller features
¬ 32-bit MCUs¬ up to 2 MB Live-Update Flash¬ 512kB Program SRAM¬ FPU
¬ Audio and Graphics Interfaces¬ HS USB and Ethernet¬ Advanced Analog
System 32-Bit I/O BusSystem 32-Bit I/O Bus
UART 0/1
SD Host
EFUSEBCD
BCD
SPI 0/1Slave(s) USB Host
CAN 0/1
USBperipheral
I2S Master/Slave I2C Master/Slave(s)
Camera
Timers/Watchdog
10-bitDAC 0/1 10-bit
ADC 1/7 PWM/PCMRTC
One-WireDebug I/F
SPI Master Ethernet
Interrupt
Page 8
The microcontroller can be programmed in three ways:
1 Using USB HID mikroBootloader,
2 Using Using external mikroProg for PIC, dsPIC, PIC32
3. Programming the microcontroller
Figure 3-1:
PIC32MZ
microcontroller
Page 9
1
3.1 Programming with mikroBootloaderYou 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:
download.mikroe.com/examples/starter-boards/clicker-2/
pic32mz/clicker-2-pic32mz-mikrobootloader-usb-hid-v100.zip
After the mikroBootloader software is downloaded,
unzip it to desired location and start it.
Figure 3-2: USB HID mikroBootloader window
step 1 – Connecting clicker 2 for PIC32MZ
clicker_2_pic32mz_bootloader.zipWinRAR ZIP archive
clicker_2_pic32mz_bootloaderFile folder
SoftwareFile folder
mikroBootloader USB HID.exeBootloader tool for mikroElektron...mikroElektronika
Clicker 2 PIC32MZ USB HID Bootloader v1.300.hexHEX File
FirmwareFile folder
1
To start, connect the USB cable, or if already connected press the Reset button on your Clicker 2 for PIC32MZ. Click the Connect button within 5s to enter the bootloader mode, otherwise existing microcontroller program will execute.
Page 10
clicker2 for PIC32.hex HEX.file
step 3 – Selecting .HEX file step 2 – Browsing for .HEX file
1 Select .HEX file using open dialog window.
2 Click the Open button.
Figure 3-3: Browse for HEX
Figure 3-4: Selecting HEX
11
2
clicker 2 for PIC32MZ
PIC32MZ
Page 11
Beginuploading
Figure 3-5: Begin uploading Figure 3-6: Progress bar
1 To start .HEX file bootloading click the
Begin uploading button.
1 Progress bar enables you to monitor .HEX file uploading.
step 4 – Uploading .HEX file
11
clicker 2 for PIC32MZ clicker 2 for PIC32MZ
PIC32MZ PIC32MZ
PIC32MZ
Page 12
Figure 3-7: Restarting MCU Figure 3-8: mikroBootloader ready for next job
1 Click OK button after the uploading process is finished.
2 Press Reset button on Clicker 2 for PIC32MZ board and wait
for 5 seconds. Your program will run automatically.
step 5 – Finish upload
1
PIC32MZ.hex
PIC32MZ.hex
The microcontroller can be
programmed with external
mikroProg for PIC, dsPIC, and
PIC32 programmer and mikroProg
Suite for PIC32MZ software. The
external programmer is connected
to the development system via 2x5
connector Figure 3-9. mikroProg
is a fast USB 2.0 programmer with
hardware debugger support.
It supports all PIC, dsPIC, and PIC32
devices in a single programmer.
Outstanding performance, easy
operation and elegant design are its
key features. Figure 3-8:
mikroProg connector
3.2 Programming with mikroProg programmer
Page 13
Page 14
Figure 3-10: mikroProg Suite for PIC32 window
mikroProg Suite for PIC32MZ software
mikroProg programmer requires
special programming software called
mikroProg Suite for PIC32®. 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.
PIC32
Page 15
Figure 4-1: Two LEDs, two buttons and a reset button
The board also contains a 1 reset button
and a pair of 2 buttons and 3 LEDs, as
well as an ON/OFF switch. The Reset button
is used to manually reset the microcontroller
— it generates a low voltage level on the
microcontroller’s reset pin. LEDs can be used
for visual indication of the logic state on two
pins (P34 and P18). 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 (P35
and P2) from logic high (1) to logic low (0). In
addition to the onboard ON/OFF switch, two
pins allow you to connect your own external
switch (located beneath the switch).
4. Buttons and LEDs
1 2 3
Page 16
Clicker 2 for PIC32MZ features LTC®3586, 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-2: power
management and battery
charger IC
5. Power management and battery charger
Page 17
Figure 6-2:24MHz crystal
oscillator module (Y2)
Figure 6-1:32.768 kHz crystal
oscillator module (Y1)
Two onboard oscillators act as external
sources for PIC32MZ’s two system clocks.
A 24 MHz oscillator provides a reference
frequency output to the clock multiplier
PLL. A a 32.768kHz oscillator provides a
clock for the internal RTCC.
6. Oscillators
PIC32MZ 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 micro USB connector which is positioned next to the
battery connector.
Figure 7-1: Connecting USB cable to Clicker 2
7. USB connection
Page 18
Page 19
9. Pinout
SPI LinesInterrupt LinesAnalog LinesDigital lines I2C Lines UART lines PWM lines
VSYSRSTReset pin System power supplyGNDGNDReference Ground Reference GroundRB9RB10RB11RE3RA1RG0RF13RG1RF12RF1RB12RF0RF4RD5RF3RD4RB15RG14RB1RG12RE1RG9RE0RE2RA7RE4RA6RG15RD13RA5RD0RE5RA4RE6 RD12RD14RD1RD15RD2RF8RD3RF23.3V3.3V3.3V power supplyGNDGNDReference Ground
Pin functions Pin functions
Digital I/O lines
SPI3 Lines
Interrupt Lines
Analog Lines
RXTX SCK
SCL SDISDA SDO
UART3 Lines
I2C2 Lines
PWM lines
Digital I/O lines
3.3V power supplyReference Ground
Up to now, MikroElektronika has released more than a 350 mikroBUSTM compatible click
boardsTM. On the average, three click boards™ are 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:
www.mikroe.com/click
Figure 10-1:
Clicker 2 for PIC32MZ
driving click boards™
10. click boards™ are plug and play!
Page 20
Page 21
11. Dimensions
Page 22
DISCLAIMERAll 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.
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.
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.The FTDI Chip® and Windows® logos and product names are trademarks of FTDI Chip and Microsoft® in the U.S.A. and other countries.
Copyright © 2017 MikroElektronika. All Rights Reserved.
∫ If you want to learn more about our products, please visit
our website 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 helpdesk.mikroe.com∫ If you have any questions, comments or business proposals,
do not hesitate to contact us at [email protected]
Designed by
MikroElektronika Ltd.