Download PIC Clicker User Manual
Transcript
PIC clicker A compact starter kit with your favorite microcontroller and a socket for Click add-on boards. New ideas are just a click away. 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. Page 2 Table of Contents 1. What is PIC clicker? 4 step 3 – Selecting .HEX file 11 2. Power supply 6 step 4 – Uploading .HEX file 12 3. PIC18F47J53 microcontroller 8 step 5 – Finish upload Key microcontroller features 8 Programming with mikroProg Programmer 4. Programming the microcontroller 9 13 ™ 14 5. mikroProg Suite™ for PIC® Software 16 Programming with mikroBootloader 10 6. Buttons and LEDs 18 step 1 – Connecting PIC clicker 10 7. Click boards are plug and play! 20 step 2 – Browsing for .HEX file 11 8. Dimensions 24 Page 3 1. What is PIC clicker? 06 01 USB MINI-B connector 07 05 02 3.3V Voltage regulator 08 03 mikroProg™ Programmer connector 10 04 44-pin PIC18F47J53 microcontroller 05 16 MHz crystal oscillator 06 Connection pads 11 07 mikroBUS™ socket 05 08 RESET button 10 09 Power indication LED 10 Additional button 01 02 03 04 Figure 1-1: PIC clicker 09 PIC clicker is an amazingly compact starter development kit which brings innovative mikroBUS™ host socket to your favorite microcontroller. It features PIC18F47J53, 8-bit microcontroller, two indication LEDs, two general purpose buttons, reset button, USB MINI-B connector and a single mikroBUS™ host socket. mikroProg connector and pads for interfacing with external 11 Additional LEDs electronics are provided as well. mikroBUS™ host 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. PIC clicker board can be powered over USB cable. On-board power circuitry generates 3.3V and 5V. Power diode (GREEN) indicates the presence of power supply. Page 4 3.3V VOLTAGE REGULATOR T1 R1 4K7 VCC3V3 2 Vout 1 GND LD29080DT33 C13 10uF RC6/PWM RC5/D+ RC4/DRD3/RP20 RD2/RP19 RD1/SDA RD0/SCL C12 10uF Vin RC7/MOSI RD4/INT RD5/RX RD6/TX RC4/DRC5/D+ mPROG T3 RST R7 MCLR# 1K C8 100nF RB3/CS HD1 1 2 3 4 5 PIC18F47J53 44pin QFN 33 32 31 30 29 28 27 26 25 24 23 RB4/SCK RB5/MISO RB6/PGC RB7/PGD MCLR# RA0/RP0 RA1/RP1 RA2/AN VCC3V3 OSC2 OSC1 VSS2 AVSS1 VDD2 AVDD2 RE2 RE1 RE0 RA5 VDDcore/Vcap 12 13 14 15 16 17 18 19 20 21 22 R6 10K RC7 RD4 RD5 RD6 RD7 VSS1 AVDD1 VDD1 RB0 RB1 RB2 RB3 NC RB4 RB5 RB6 RB7 MCLR RA0 RA1 RA2 RA3 VCC3V3 1 2 3 4 5 6 7 8 9 10 11 RC6 RC5 RC4 RD3 RD2 RD1 RD0 VUSB RC2 RC1 RC0 RC6/PWM RD4/INT RD5/RX RD6/TX RD0/SCL RD1/SDA PWM INT RX TX SCL SDA 5V GND VCC3V3 C9 100nF FP1 FERRITE U1 AN RST CS SCK MISO MOSI 3.3V GND VCC3V3 C4 100nF VCC5 RB0 RB1 RB2/RST RB6/PGC RB7/PGD MCLR# VCC3V3 C3 100nF VCC5 R4 100K RA2/AN RB2/RST RB3/CS RB4/SCK RB5/MISO RC7/MOSI VCC3V3 C2 100nF VCC3V3 C10 1uF VCC3V3 44 43 42 41 40 39 38 37 36 35 34 VCC3V3 VCC3V3 C1 100nF RD2/RP19 Schematic PWR VCC3V3 REG1 3 VCC5 T2 RC2 RC1 RC0 R10 470 VCC3V3 R2 4K7 RD3/RP20 VCC3V3 VCC3V3 Figure 1-2: PIC clicker schematic Page 5 R3 27 R5 27 C6 OSC2 OSC1 22pF C5 10nF C7 RA1/RP1 22pF R9 LD2 4K7 C14 10uF RA0/RP0 VCC3V3 RE0 RE1 RE2 RB1 RB0 RC0 RC1 RC2 R8 4K7 1 2 3 4 5 6 7 8 9 10 HD2 VBUS DD+ ID GND USB MINIB X1 16MHz RE2 RE1 RE0 CN1 1 2 3 4 5 LD1 C11 1uF 2. Power supply Figure 2-1: connecting USB power supply through CN1 connector When the board is powered up the power indication LED will be automatically turned on. The USB connection can provide up to 500mA of current which is more than enough for the operation of all on-board and additional modules. Page 6 3.3V VOLTAGE REGULATOR VCC3V3 1 2 3 4 5 6 7 8 9 10 HD2 VCC5 VCC3V3 R10 470 PWR FP1 FERRITE VCC3V3 3 VCC5 REG1 Vin Schematic 2 C12 10uF C13 10uF Vout GND 1 LD29080DT33 Figure 2-2: Power supply schematic Page 7 C5 10nF CN1 1 2 3 4 5 VBUS DD+ ID GND USB MINIB 3. PIC18F47J53 microcontroller The PIC clicker development tool comes with the PIC18F47J53 microcontroller. This 8-bit low power and high performance 12 MIPS 8bit Core - nanoWatt - Up to 48M Hz microcontroller is rich with on-chip peripherals and features 128KB of Flash and 3,800 Bytes of RAM. It has integrated full speed USB 2.0. support. 31 Level Stack Instruction Data/Memor y Bus Flash (Up to 128K - Up to 12 MIPS Operation B) - 8-bit architecture RAM (Up to 3.8K B) Data Bus - 128KB of Flash memory - 44 pin TQFP Data Address Address Decoder Data Key microcontroller features - 3,800 bytes of RAM PIC18F Program Counter SPI I2C - 13 ch, 12-bit ADC - USB 2.0, UART, SPI, I2C, etc. Page 8 I/O Timers Comparators ADC 12-Bit USART CCP USB 2.0 4. Programming the microcontroller Figure 4-1: PIC18F47J53 microcontroller The microcontroller can be programmed in two ways: 01 Using USB HID mikroBootloader, 02 Using external mikroProg™ for PIC®, dsPIC®, PIC32® programmer. Page 9 Programming with mikroBootloader step 1 – Connecting PIC 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: http://www.mikroe.com/downloads/get/2039/ mikrobootloader_usb_hid_pic18f47j53.zip 01 After the mikroBootloader software is downloaded, unzip it to desired location and start it. Figure 4-2: USB HID mikroBootloader window 01 To start, connect the USB cable, or if already connected press the Reset button on your PIC clicker. Click the Connect button within 5s to enter the bootloader mode, otherwise existing microcontroller program will execute. Page 10 step 2 – Browsing for .HEX file step 3 – Selecting .HEX file 01 01 02 Figure 4-3: Browse for HEX Figure 4-4: Selecting HEX 01 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. 01 Select .HEX file using open dialog window. 02 Click the Open button. Page 11 step 4 – Uploading .HEX file 01 01 Figure 4-5: Begin uploading Figure 4-6: Progress bar 01 To start .HEX file bootloading click the Begin uploading button. 01 Progress bar enables you to monitor .HEX file uploading. Page 12 step 5 – Finish upload 01 Figure 4-7: Restarting MCU Figure 4-8: mikroBootloader ready for next job 01 Click OK button after the uploading process is finished. 02 Press Reset button on PIC clicker board and wait for 5 seconds. Your program will run automatically. Page 13 Programming with mikroProg™ programmer Figure 4-9: mikroProg™ connector The microcontroller can be programmed with external mikroProg™ for PIC®, dsPIC® and PIC32® programmer and mikroProg Suite™ for PIC® software. The external programmer is connected to the development system via 1x5 mikroProg™ connector, Figure 4-9. mikroProg™ is a fast USB 2.0 programmer with hardware debugger support. It supports PIC10®, PIC12®, PIC16®, PIC18®, dsPIC30/33®, PIC24® and PIC32® devices from Microchip®. Outstanding performance, easy operation and elegant design are it’s key features. Page 14 VCC3V3 VCC3V3 44 43 42 41 40 39 38 37 36 35 34 VCC3V3 VCC3V3 VCC3V3 C3 100nF VCC3V3 C2 100nF C4 100nF VCC3V3 C10 1uF RC6 RC5 RC4 RD3 RD2 RD1 RD0 VUSB RC2 RC1 RC0 1 2 3 4 5 6 7 8 9 10 11 RC7 RD4 RD5 RD6 RD7 VSS1 AVDD1 VDD1 RB0 RB1 RB2 OSC2 OSC1 VSS2 AVSS1 VDD2 AVDD2 RE2 RE1 RE0 RA5 VDDcore/Vcap PIC18F47J53 44pin QFN 33 32 31 30 29 28 27 26 25 24 23 C6 OSC2 OSC1 RE2 RE1 RE0 C7 C14 10uF RB6/PGC RB7/PGD MCLR# C11 1uF HD1 1 2 3 4 5 mikroProg Figure 4-10: mikroProg™ connection schematic note 22pF VCC3V3 RB6/PGC RB7/PGD MCLR# VCC3V3 22pF X1 16MHz 12 13 14 15 16 17 18 19 20 21 22 C9 100nF U1 RB3 NC RB4 RB5 RB6 RB7 MCLR RA0 RA1 RA2 RA3 C1 100nF Make sure to use only the front row of mikroProg’s IDC10 connector (side with a knob and incision) when connecting it to 1x5 header on your PIC clicker board. Page 15 5. 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. 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 5-1: Main window of mikroProg Suite™ for PIC® programming software Page 16 Software Installation Wizard 01 Start Installation 02 Accept EULA and continue 03 Install for all users 04 Choose destination folder 05 Installation in progress 06 Finish installation Page 17 6. Buttons and LEDs 01 02 03 Figure 6-1: Two buttons, two LEDs and a reset button The board also contains 01 reset button and a pair of 02 buttons and 03 LEDs. Each of these additional peripheral are located in the bottom area of the board. Reset button is used to manually reset the microcontroller. Pressing the reset button will generate low voltage level on microcontroller reset pin. LEDs can be used for visual indication of the logic state on two pins (RA0 and RA1). An active LED indicates that a logic high (1) is present on the pin. Pressing any of these buttons can change the logic state of the microcontroller pins (RD2 and RD3) from logic high (1) to logic low (0). Page 18 VCC3V3 VCC3V3 T2 C2 100nF VCC3V3 C3 100nF VCC3V3 C4 100nF VCC3V3 C9 100nF RD2/RP19 C11 1uF VCC3V3 44 43 42 41 40 39 38 37 36 35 34 R2 4K7 VCC3V3 C10 1uF RD3/RP20 RD2/RP19 C1 100nF VCC3V3 VCC3V3 VCC3V3 R1 4K7 RD3/RP20 T1 RST PIC18F47J53 44pin QFN 33 32 31 30 29 28 27 26 25 24 23 R7 MCLR# 1K C8 100nF MCLR# RA0/RP0 RA1/RP1 T3 OSC2 OSC1 VSS2 AVSS1 VDD2 AVDD2 RE2 RE1 RE0 RA5 VDDcore/Vcap 12 13 14 15 16 17 18 19 20 21 22 R6 10K RC7 RD4 RD5 RD6 RD7 VSS1 AVDD1 VDD1 RB0 RB1 RB2 RB3 NC RB4 RB5 RB6 RB7 MCLR RA0 RA1 RA2 RA3 VCC3V3 1 2 3 4 5 6 7 8 9 10 11 RC6 RC5 RC4 RD3 RD2 RD1 RD0 VUSB RC2 RC1 RC0 U1 Figure 6-2: Other modules connection schematic Page 19 C6 OSC2 OSC1 22pF X1 16MHz RE2 RE1 RE0 C14 10uF C7 RA1/RP1 R9 22pF LD2 4K7 RA0/RP0 R8 4K7 LD1 7. Click boards are plug and play! Up to now, MikroElektronika has released more than 70 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 codes. Please visit the Click boards™ webpage for the complete list of currently available boards: http://www.mikroe.com/click/ Figure 7-1: PIC clicker driving GSM click board Page 20 RFid click™ Relay click™ 8x8 click™ BarGraph click™ 7seg click™ THERMO click™ FM click™ Gyro click™ Page 21 Bluetooth2 click™ Thunder click™ USB SPI click™ EEPROM click™ LightHz click™ Pressure click™ 8. Dimensions 75.6 2979 71.6 2819 12.7 500 2.54 100 16.7 659 8 1.6 315 63 Legend mm mils Mounting hole size Ø2 Ø 79 17.2 679 25.4 1000 Page 22 4 159 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. 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, the MikroElektronika logo, mikroBUS™, Click Boards™ 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 © MikroElektronika, 2013, All Rights Reserved. Page 23 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 [email protected] PIC clicker Manual ver. 1.01 0 100000 024591