A compact starter kit with your favorite microcontroller and two mikroBUS™ sockets
TO OUR VALUED CUSTOMERS 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. Nebojsa Matic General Manager The PIC® and Windows® logos and product names are trademarks of Microchip Technology® and Microsoft® in the U.S.A. and other countries.
Table of contents Introduction to clicker 2 for PIC32MX 4 3.2 Programming with mikroProg™ programmer Key features 5 1. Power supply 7 4. Buttons and LEDs 18 2. PIC32MX460F512L microcontroller 9 5. Power management and battery charger 20 Key microcontroller features 9 6. Oscillators 21 mikroProg Suite for PIC software ™ ® 15 16 3. Programming the microcontroller 10 7. USB connection 23 3.1 Programming with mikroBootloader 11 8.
Introduction to clicker 2 for PIC32MX Clicker 2 for PIC32MX 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 PIC32MX460F512L, a 32-bit MIPS M4K core PIC32 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™ socket.
Key features 1 12 2 13 1 ON/OFF switch 3 2 Pads for connecting external ON/OFF switch 4 3 32.
VCC-3.3V C9 C10 C11 C12 C35 C36 C37 10uF 100nF 100nF 100nF 100nF 100nF 100nF 100nF VCC-3.3V VSYS VCC-3.3V Vcap RB0-MB1_AN0 RE2-MB1_RST RG13-MB1_CS RG6_SPI2_SCK RG7_SPI2_MISO RG8_SPI2_MOSI E1 10uF R16 C14 C15 C16 C17 10K 22uF 1uF 10nF 1uF 3K3 VSYS C18 100nF RG15-STAT RE6-GPIO SWCD3 EN3 VOUT3 VOUT3 VIN3 VIN3 SWAB3 C20 2.2uF 2.2uF RG6_SPI2_SCK R9 RG7_SPI2_MISO RG8_SPI2_MOSI R7 RESET# RG9-T3 PWR-EN VCC-3.3V L2 VCC-3.3V VCC-3.3V 2.
1. Power supply Battery power supply Figure 1-1: Connecting USB 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.
LDO3V3 RG15-STAT LDO3V3 LD4B RED R15 R16 2K2 VCC-3.3V VCC-3.3V VCC-3.3V LDO3V3 C14 C15 22uF 10K C16 1uF 10nF VSYS FAULT R20 C22 10K 22uF LDO3V3 R23 1K69 C25 100nF LTC3586 C19 C20 2.2uF 2.2uF 19 18 17 16 15 14 13 3 5 2 PWR-EN 4 1 C18 100nF L2 LDO3V3 C31 C32 22uF 10uF 1K DMP2305U C1 C2 100nF 2.2uF R12 100K R13 100K RB12-VSENSE VCC-BAT R19 324K VSYS R14 100K HDR1 HDR2 VCC-BAT C38 C21 2.
2. PIC32MX460F512L microcontroller The PIC32MX clicker development tool comes with the PIC32MX460F512L microcontroller. This 32-bit MIPS M4K Core high performance microcontroller is rich with on-chip peripherals and features 512KB of Flash and 32KB RAM. It has integrated full speed USB 2.0. support.
3.
3.1 Programming with mikroBootloader step 1 – Connecting PIC32MX clicker You can program the microcontroller with 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: www.mikroe.com/downloads/get/2210/ clicker_2_pic32mx_bootloader_v100.zip 01 After the mikroBootloader software is downloaded, unzip it to desired location and start it.
step 2 – Browsing for .HEX file step 3 – Selecting .HEX file 01 01 02 Figure 3-3: Browse for HEX 01 Figure 3-4: Selecting HEX 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. Page 12 01 Select .HEX file using open dialog window. 02 Click the Open button.
step 4 – Uploading .HEX file 01 01 Figure 3-5: Begin uploading 01 Figure 3-6: Progress bar To start .HEX file bootloading click the Begin uploading button. 01 Page 13 Progress bar enables you to monitor .HEX file uploading.
step 5 – Finish upload 01 Figure 4-8: mikroBootloader ready for next job Figure 3-7: Restarting MCU 01 Click OK button after the uploading process is finished. 02 Press Reset button on PIC32MX clicker board and wait for 5 seconds. Your program will run automatically.
3.2 Programming with mikroProg™ programmer GND MCLR# PGD PGC VCC 3.3V You can also program it with ICD2® or ICD3® if you reroute the wires like shown here. 1. NC 2. PGC 3. PGD 4. GND 5. VCC 3.3V 6. MCLR# 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.
mikroProg Suite™ for PIC® Software The mikroProg™ programmer requires special programming software called mikroProg Suite™ for PIC®. It can be used for programming all Microchip® microcontroller families, including PIC10®, PIC12®, PIC16®, PIC18®, dsPIC30/33®, PIC24® and PIC32®. The software has intuitive interface and SingleClick™ programming technology. Just download the latest version of mikroProg Suite™ and your programmer is ready to program new devices.
VCC-3.3V Vcap E1 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 10uF 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 OSC32_OUT OSC32_IN VCC-3.3V X2 C34 32.768KHz 22pF OSC2 OSC1 RB6 RB7 RA9 RA10 AVDD AVSS RB8 RB9 RB10 RB11 VSS VDD RA1 RF13 RF12 RB12 RB13 RB14 RB15 VSS VDD RD14 RD15 RF4 RF5 the programming connector, you have to solder the provided 1x5 male header to the programming pads (HD1).
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 Reset button is used to manually reset the microcontroller by generating a low voltage level on the microcontroller’s reset pin. LEDs can be used for visual indication of the logic state on two pins (RE3) and (RA10). An active LED indicates that a logic high (1) is present on the pin.
RE4-T2 RE3-LD1 VCC-3.3V VCC-3.3V Vcap E1 R4 RESET# 10uF R3 10K RST 1K 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 T1 VCC-3.3V VCC-3.3V C12 C35 100nF 100nF VCC-3.3V VCC-3.3V C36 C37 100nF 100nF RESET# RG9-T3 PIC32MX460F512L 100pin TQFP X2 32.768KHz 22pF C33 22pF AVCC VCC-3.3V FP1 OSC1 X1 C5 8MHz 22pF C6 C1 C2 100nF 2.2uF 22pF R1 R2 2K2 2K2 T2 VCC-3.3V R5 10K AVCC Figure 4-2: Other modules connection schematic Page 19 T3 VCC-3.
5. Power management and battery charger Clicker 2 for PIC18FJ features LTC®3586-1, 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.
6. Oscillators Board is equipped with 8MHz and 32.7kHz crystal oscillators (X1 and X2) that provide external clock waveforms to the microcontroller OSC2 and OSC1 (X1) and SOSCO and SOSCI (X2) 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: 32.
VCC-3.3V Vcap E1 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 10uF C9 10uF 100nF VCC-3.3V VCC-3.3V C10 C11 100nF 100nF VCC-3.3V VCC-3.3V C12 C35 100nF 100nF VCC-3.3V VCC-3.
7. USB connection PIC32MX460F512L 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.
VCC-3.3V Vcap E1 VCC-USB 10uF 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 USB-DET USB-D_N USB-D_P USB-ID 10uF 100nF VCC-3.3V VCC-3.3V C10 C11 100nF VCC-3.3V VCC-3.3V C12 C35 100nF 100nF VCC-3.3V VCC-3.
RD7-GPIO RD6-GPIO RD5-GPIO RD4-MB1-PWM5 RD13-GPIO RD12-GPIO RD3-PWM4 RD2-PWM3 RD1-PWM2 VCC-3.3V RF1-GPIO RF0-GPIO RE0-GPIO RA7-GPIO RA6-GPIO RG0-GPIO RE4-T2 RE3-LD1 RE2-MB1_RST RG13-MB1_CS RG12-GPIO RG14-GPIO 8. Pads AVCC Vcap VCC-3.3V FP1 E1 C1 C2 100nF 2.
9. Pinout Reset pin Reference Ground PWM lines Digital I/O lines RX TX SCL I2C2 Lines SDA 3.3V power supply Reference Ground UART2 Lines RST GND VSYS GND RB15 RB14 RB13 RB11 RB10 RB9 RB8 RA14 RA15 RE9 RE8 RF12 RD9 RD8 RA4 RA9 RF3 RA0 RE6 RG6 RG7 RG8 3.3V GND RD1 RD2 RD3 RD0 RD12 RD13 RD5 RD6 RD7 RF0 RF1 RG0 RA6 RA7 RE0 RG14 RF4 RF5 RA2 RA3 3.3V GND Pin functions Digital lines System power supply Reference Ground Analog Lines Interrupt Lines Digital I/O lines SCK SPI2 Lines SDI SDO 3.
9.1 PWM jumper selection Clicker 2 for PIC32MX employs a solution to optimize Analog line 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: Digital lines* 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.
9.2 RF3/USBID Jumper selection Clicker 2 for PIC32MX 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 To use RF3 as a GPIO, keep the jumper in the default position (connected to the corresponding pin on the 1x26 connection pad, see page 26) 2 To connect the RF3 MCU pin to USB-ID (one of the four pins on the USB port), resolder the RF3 SEL jumper (zero-ohm resistor) to the other position.
10. click™ boards are plug and play! Up to now, MikroElektronika has released more than a 100 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: www.mikroe.
RFid click™ Relay click™ 8x8 click™ FM click™ Bluetooth2 click™ Thunder click™ USB SPI click™ BarGraph click™ 7seg click™ THERMO click™ Gyro click™ EEPROM click™ LightHz click™ Pressure click™ Page 30
11.
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.
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 Clicker 2 for PIC32MX manual ver 1.