33
A compact starter kit with your favorite microcontroller and two mikroBUS sockets

Clicker 2 Pic32mx Manual v102

  • Upload
    yohili

  • View
    252

  • Download
    8

Embed Size (px)

DESCRIPTION

Click for electronic building

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.

    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 contentsIntroduction to clicker 2 for PIC32MX 4

    Key features 5

    1. Power supply 7

    2. PIC32MX460F512L microcontroller 9

    Key microcontroller features 9

    3. Programming the microcontroller 10

    3.1 Programming with mikroBootloader 11

    step 1 Connecting clicker 2 for PIC32MX 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 PWM jumper selection 27

    9.2 RF3/USBID jumper selection 28

    10. click boards are plug and play! 29

    11. Dimensions 31

  • 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. 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 PIC32MX board can be powered over a

    USB cable.

    power supplyvia USB cable (5V DC)

    board dimensions60.4 x 81 mm (2.4 x 3.2 inch)

    weight26 g (0. 057 lbs)

    Introduction to clicker 2 for PIC32MX

    Page 4

  • Page 5

    1 ON/OFF switch

    2 Pads for connecting external ON/OFF switch

    3 32.768 KHz crystal oscillator

    4 8 MHz crystal oscillator

    5 PIC32MX460F512L

    6 2x26 connection pads

    7 mikroBUS sockets 1 and 2

    8 Pushbuttons

    9 Additional LEDs

    10 LTC3586-1 USB power manager IC

    11 Power and Charge indication LEDs

    12 RESET button

    13 USB mini-B connector

    14 Li-Polymer battery connector

    15 Programmer connector

    12

    13

    6

    7

    8

    9

    14

    15

    1

    2

    3

    4

    5

    6

    7

    8

    9

    11

    10

    Key features

  • Page 6

    VCC-3.3VAVCCFP1

    C1

    100nF

    C2

    2.2uF

    R310K

    VCC-3.3V

    C3

    100nF

    R4

    1K

    RSTRESET#

    T1

    R8470

    LD3

    VCC-3.3V

    RESET#

    VCC-3.3

    12345

    HD1

    RB6-PGC2RB7-PGD2

    mPROG

    HDR2

    RXTX

    SDASCL

    PWM

    VCC-3.3V

    RESET#

    RF5-UART2_TXRF4-UART2_RX

    RA2-I2C2_SCLRA3-I2C2_SDA

    RD0-PWM1

    RD1-PWM2RD2-PWM3RD3-PWM4

    RD12-GPIORD13-GPIORD5-GPIORD6-GPIORD7-GPIORF0-GPIORF1-GPIO

    RG14-GPIO

    RG0-GPIORA6-GPIORA7-GPIORE0-GPIO

    R14100K

    R12100K

    VCC-BAT

    R13100K

    C13100nF

    M1

    DMP2305U

    R101M

    R11

    1K

    VCC-BAT

    RB12-VSENSE

    RF13-SENSEL

    J1

    MB2_PWMRD0-PWM1

    RG12-GPIO

    ANRSTCSSCKMISOMOSI3.3VGND

    PWMINTRXTX

    SCLSDA

    5VGND

    VCC-3.3V VCC-5V

    2RG8_SPI2_MOSI

    RG6_SPI2_SCKRG7_SPI2_MISO

    RF5-UART2_TXRF4-UART2_RX

    RA2-I2C2_SCLRA3-I2C2_SDA

    MB2_PWMRE9-MB2-INT2

    RB1-MB2_CSRB2-MB2_RSTRB4-MB2_AN4

    HDR1

    AN

    INT

    VCC-3.3V

    SCKSDI

    SDO

    VSYS

    RG8_SPI2_MOSI

    RG6_SPI2_SCKRG7_SPI2_MISO

    RA14-INT3RA15-INT4

    RE8-MB1-INT1RE9-MB2-INT2

    RB14-AN14RB13-AN13

    RB15-AN15

    RB9-AN9

    RB11-AN11RB10-AN10

    RB8-AN8

    RF12-GPIO

    RF3-GPIO

    RA4-GPIORD8-GPIORD9-GPIO

    RE6-GPIO

    RA9-GPIO

    RA0-GPIO

    C2610nF

    FP2FERRITER24 100 1

    2345 GND

    IDD+D-VBUS

    CN2

    USB MINIB

    USB-D_NUSB-D_P

    VCC-USB

    USB-DET

    USB-ID

    VCC-BAT

    CN1BATTCONN

    VCC-3.3V

    C40

    10uF

    C9

    100nF

    C10

    100nF

    C11

    100nF

    VCC-3.3V VCC-3.3V VCC-3.3V

    C12

    100nF

    C35

    100nF

    VCC-3.3V

    C36

    100nF

    VCC-3.3V

    C37

    100nF

    VCC-3.3VVCC-3.3V

    C38

    2.2uF

    VCC-BAT

    ANRSTCSSCKMISOMOSI3.3VGND

    PWMINTRXTX

    SCLSDA

    5VGND

    VCC-3.3V VCC-5V

    1RG8_SPI2_MOSI

    RG6_SPI2_SCKRG7_SPI2_MISO

    RF8-UART1_TXRF2-UART1_RX

    RA2-I2C2_SCLRA3-I2C2_SDA

    RD4-MB1-PWM5RE8-MB1-INT1RE2-MB1_RST

    RG13-MB1_CS

    RB0-MB1_AN0

    T2 T3

    R510K

    R610K

    VCC-3.3V VCC-3.3V

    R1

    2K2

    R2

    2K2

    RE4-

    T2

    RE3-

    LD1

    RG9-

    T3

    RA10

    -LD

    2

    PWR-EN

    C18100nF

    LDO3V3

    R171K

    1

    2

    3

    4

    5

    6

    SW1JS202011AQN

    VCC-3.3

    VCC-3.3V

    C14

    22uF

    VCC-3.3V

    C17

    1uF

    LDO3V3

    C15

    1uF

    VCC-3.3V

    C16

    10nF

    VCC-3.3V

    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 15

    VOUT3 16VOUT3 17

    EN3 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-1

    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

    C24300pF

    R19324K

    R22105K

    C21

    33pF

    VCC-3.3VVCC-3.3V

    C19

    2.2uF

    VSYS

    VSYS

    L32.2uH

    VSYS

    R2716K9

    C29

    10pF

    C30

    22uF

    VCC-5V

    VCC-5V VCC-5V VCC-5V

    R18

    3K3

    R2688K7

    C25100nF

    R231K69

    LD4BRED

    LDO3V3

    VSYS

    PWR-ENPWR-EN

    C20

    2.2uF

    VCC-BAT

    R20

    10K

    C27

    1uF

    VCC-5V

    C28

    10nF

    VCC-5V

    R16

    10K

    LDO3V3LDO3V3

    VCC-USB

    RG15-STAT

    LDO3V3

    FAULT

    OSC2OSC1 X1

    C5

    22pF

    C6

    X2

    32.768KHzC34

    22pF

    C33

    22pF

    OSC32_INOSC32_OUT

    E1

    10uF

    RB9-

    AN9

    Vcap

    RG8_SPI2_MOSI

    RG6_SPI2_SCKRG7_SPI2_MISO

    75747372717069686766

    6465

    63626160595857565554535251

    50494847464544434241403938373635343332313029282726

    9

    1112

    43

    78 77

    2423

    181716151413

    5678

    10

    7980

    12

    22212019

    25

    76

    PIC32MX460F512L100pin TQFP

    81828384858687888990919293949596979899100

    RB11

    RB10

    RB9

    RB8

    RB13

    RB12

    RE7RC1RC2RC3

    RD9RD8

    RA15

    D+/RG2

    RB15

    RB14

    RF8VBUSVUSB

    D-/RG3

    VSS

    VDD

    RA6

    RG0

    RG1

    RE0

    RF1

    RF0

    RD7

    RD6

    RE6RE5

    RE2

    RG13

    RG12

    RG14 RE1

    RA7

    RG8

    RA9

    RB2RB3RB4RB5RE9RE8

    RD11RD10

    RF2RF3

    RG9

    RG7RG6

    RA1

    RE3

    RE4

    RG15VDD

    RB7

    RB6

    RB0RB1

    RF4

    RF5

    RA14

    RA5

    RD14

    RD15

    RA2

    RF13

    VDD

    RA3

    VDD

    VDD

    RA0VDDVSS

    VSS

    RF12

    RA4

    VSS

    VCAP

    /VD

    DCO

    RE

    AVSS

    AVD

    DRA

    10

    MCLR

    RC4

    OSC1/RC12OSC2/RC15

    RD0

    RD3

    RD1

    SOSCI/RC13SOSCO/RC14

    VSS

    RD2

    RD12

    RD13

    RD4

    RD5

    U1

    R9

    R7RESET#

    RF8-UART1_TXRF2-UART1_RX

    RF5-

    UAR

    T2_T

    XRF

    4-U

    ART2

    _RX

    RA2-I2C2_SCLRA3-I2C2_SDA

    RD4-

    MB1

    -PW

    M5

    RD0-PWM1

    RD1-

    PWM

    2RD

    2-PW

    M3

    RD3-

    PWM

    4

    USB-D_NUSB-D_P

    USB-DET

    R28R29

    VCC-3.3V

    RB14

    -AN

    14RB

    13-A

    N13

    RB12

    -VSE

    NSE

    RB11

    -AN

    11RB

    10-A

    N10

    RB15

    -AN

    15

    AVCCRB

    7-PG

    D2

    RB6-

    PGC2

    RD12

    -GPI

    ORD

    13-G

    PIO

    RD5-

    GPI

    ORD

    6-G

    PIO

    RD7-

    GPI

    O

    RB8-

    AN8

    RF0-

    GPI

    ORF

    1-G

    PIO

    RG0-

    GPI

    ORA

    6-G

    PIO

    RA7-

    GPI

    ORE

    0-G

    PIO

    RE2-

    MB1

    _RST

    RG13

    -MB1

    _CS

    RE3-

    LD1

    RG12

    -GPI

    O

    RE4-

    T2

    RE8-MB1-INT1RE9-MB2-INT2

    RF13

    -SEN

    SEL

    RB1-MB2_CSRB2-MB2_RST

    RB4-MB2_AN4

    RB0-MB1_AN0

    RF12

    -GPI

    O

    RA4-GPIO

    RD8-GPIORD9-GPIO

    RE6-GPIO

    RA14-INT3RA15-INT4

    RG14

    -GPI

    O

    RG15-STAT

    RA9-

    GPI

    O

    RA0-GPIO

    RG9-T3

    J2

    RF3-GPIOUSB-ID-RF3

    USB-ID-RF3

    USB-ID

    RA10

    -LD

    2

    8MHz

    22pF

    clicker 2 for PIC32MX 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

    click boards that use a 3.3V power supply can draw up to 750 mA of current, which is more current than a USB can supply

    (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

    C1

    100nF

    C2

    2.2uF

    R8470

    LD3

    VCC-3.3V

    R14100K

    R12100K

    VCC-BAT

    R13100K

    C13100nF

    M1

    DMP2305U

    R101M

    R11

    1K

    VCC-BAT

    RB12-VSENSE

    RF13-SENSEL

    HDR2

    VCC-3.3V

    HDR1

    VCC-3.3V

    VSYS

    C2610nF

    FP2FERRITE

    12345 GND

    IDD+D-VBUS

    CN2

    USB MINIB

    VCC-USB

    VCC-BAT

    CN1BATTCONN

    C38

    2.2uF

    VCC-BAT

    PWR-EN

    C18100nF

    LDO3V3

    R171K

    1

    2

    3

    4

    5

    6

    SW1JS202011AQN

    VCC-3.3

    VCC-3.3V

    C14

    22uF

    VCC-3.3V

    C17

    1uF

    LDO3V3

    C15

    1uF

    VCC-3.3V

    C16

    10nF

    VCC-3.3V

    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 15

    VOUT3 16VOUT3 17

    EN3 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-1

    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

    C24300pF

    R19324K

    R22105K

    C21

    33pF

    VCC-3.3VVCC-3.3V

    C19

    2.2uF

    VSYS

    VSYS

    L32.2uH

    VSYS

    R2716K9

    C29

    10pF

    C30

    22uF

    VCC-5V

    VCC-5V VCC-5V VCC-5V

    R18

    3K3

    R2688K7

    C25100nF

    R231K69

    LD4BRED

    LDO3V3

    VSYS

    PWR-ENPWR-EN

    C20

    2.2uF

    VCC-BAT

    R20

    10K

    C27

    1uF

    VCC-5V

    C28

    10nF

    VCC-5V

    R16

    10K

    LDO3V3LDO3V3

    VCC-USB

    RG15-STAT

    LDO3V3

    FAULT

  • Page 9

    2. PIC32MX460F512L microcontrollerThe 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.

    Bus Matrix

    Peripherial Bus

    PIC32MX

    MIPS M4K 32-bit core- 80MHz, 105 DMIPS- 5 Stage Pipeline, 32-bit ALUTrace 32-bitHW

    Mul/Div

    32 CoreRegistersShadow Set

    JTAG

    InstructionData

    RTCC

    AnalogComparators(2)

    I2C(2)

    16 Ch10-bitADCs

    UARTs(2)

    InputCapture

    (5)

    SPI(2)

    OutputComparePWM(5)

    16-bitTimers

    (5)

    PrefetchBuer Cache Flash SRAM InterruptControllerGPIO(85) VREG

    DMA4Ch

    2-wireDebug

    USBOTG

    16-bitParallelPort

    105 DMIPS/ 80MHz, 32-bit MIPS M4K Core;

    512K Flash (plus 12K boot Flash);

    32K RAM (can execute from RAM);

    85 I/O pins;

    SPI, I2C, A/D, UART;

    16-bit, 32-bit Digital Timers;

    Internal Oscillator 8MHz, 32kHz;

    RTCC; etc.

    Key microcontroller features

  • Page 10

    01

    02

    03

    Using USB HID mikroBootloader,

    Using external mikroProg for PIC32MX programmer

    Using external ICD2/3 programmer

    Figure 3-1:PIC32MX460F512L

    microcontroller

    The microcontroller can be programmed in three ways:

    3. Programming the microcontroller

  • Page 11

    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:

    Figure 3-2: USB HID mikroBootloader window

    step 1 Connecting PIC32MX clicker

    01

    01

    To start, connect the USB cable, or if already connected press the Reset button on your PIC32MX clicker. 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.

    www.mikroe.com/downloads/get/2210/ clicker_2_pic32mx_bootloader_v100.zip

    clicker 2 for PIC32MX BootloaderWinRAR ZIP archive

    clicker 2 for PIC32MX BootloaderFile folder

    SoftwareFile folder

    mikroBootloader USB HID.exeBootloader tool for mikroElektron...mikroElektronika

    clicker 2 for PIC32MX PIC32MX460F512LUSB HID Bootloader v1.300.hexHEX File

    FirmwareFile folder

    3.1 Programming with mikroBootloader

  • 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 4-8: mikroBootloader ready for next job

    01

    02

    01

    Click OK button after the uploading process is finished.

    Press Reset button on PIC32MX clicker 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-8: mikroProg

    connector

    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 forPIC32MX 1x5programmingheaders

    Page 15

  • Figure 3-9: Main window of mikroProg Suite for PIC programming software

    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.

    Page 16

  • Page 17

    RESET#

    VCC-3.3

    12345

    HD1

    RB6-PGC2RB7-PGD2

    mPROG

    VCC-3.3V

    C40

    10uF

    C9

    100nF

    VCC-3.3V

    C10

    100nF

    VCC-3.3V

    C11

    100nF

    VCC-3.3V

    C35

    100nF

    VCC-3.3V

    C36

    100nF

    VCC-3.3V

    C37

    100nF

    VCC-3.3V

    C12

    100nF

    VCC-3.3V

    OSC2OSC1 X1

    C5

    22pF

    C6

    X2

    32.768KHzC34

    22pF

    C33

    22pF

    OSC32_INOSC32_OUT

    E1

    10uF

    Vcap

    75747372717069686766

    6465

    63626160595857565554535251

    50494847464544434241403938373635343332313029282726

    9

    1112

    43

    78 77

    2423

    181716151413

    5678

    10

    7980

    12

    22212019

    25

    76

    PIC32MX460F512L100pin TQFP

    81828384858687888990919293949596979899100

    RB11

    RB10

    RB9

    RB8

    RB13

    RB12

    RE7RC1RC2RC3

    RD9RD8

    RA15

    D+/RG2

    RB15

    RB14

    RF8VBUSVUSB

    D-/RG3

    VSS

    VDD

    RA6

    RG0

    RG1

    RE0

    RF1

    RF0

    RD7

    RD6

    RE6RE5

    RE2

    RG13

    RG12

    RG14 RE1

    RA7

    RG8

    RA9

    RB2RB3RB4RB5RE9RE8

    RD11RD10

    RF2RF3

    RG9

    RG7RG6

    RA1

    RE3

    RE4

    RG15VDD

    RB7

    RB6

    RB0RB1

    RF4

    RF5

    RA14

    RA5

    RD14

    RD15

    RA2

    RF13

    VDD

    RA3

    VDD

    VDD

    RA0VDDVSS

    VSS

    RF12

    RA4

    VSS

    VCAP

    /VD

    DCO

    RE

    AVSS

    AVD

    DRA

    10

    MCLR

    RC4

    OSC1/RC12OSC2/RC15

    RD0

    RD3

    RD1

    SOSCI/RC13SOSCO/RC14

    VSS

    RD2

    RD12

    RD13

    RD4

    RD5

    U1

    RESET#

    VCC-3.3V

    AVCC

    RB7-

    PGD

    2RB

    6-PG

    C2

    8MHz

    22pF

    Before attachingthe programmingconnector, you have to solder the provided 1x5 male header to the programmingpads (HD1).

    Figure 3-10: mikroProg connection schematic

    NOTE

  • Page 18

    Figure 4-1: Two LEDs, two buttons and a reset button

    4. Buttons and LEDsThe 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

    microcontrollers 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. Pressing

    any of the two buttons can change the logic state of the microcontroller

    pins (RE4 and RG9) from logic high (1) to logic 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

    VCC-3.3VAVCCFP1

    C1

    100nF

    C2

    2.2uF

    R310K

    VCC-3.3V

    C3

    100nF

    R4

    1K

    RSTRESET#

    T1

    VCC-3.3V

    C40

    10uF

    C9

    100nF

    VCC-3.3V

    C10

    100nF

    VCC-3.3V

    C11

    100nF

    VCC-3.3V

    C36

    100nF

    VCC-3.3V

    C37

    100nF

    VCC-3.3V

    C35

    100nF

    VCC-3.3V

    C12

    100nF

    VCC-3.3V

    T2 T3

    R510K

    R610K

    VCC-3.3V VCC-3.3V

    R1

    2K2

    R2

    2K2

    RE4-

    T2

    RE3-

    LD1

    RG9-

    T3

    RA10

    -LD

    2

    OSC1 X1

    C5

    22pF

    C6

    X2

    32.768KHzC34

    22pF

    C33

    22pF

    OSC32_INOSC32_OUT

    E1

    10uF

    RB9-

    AN9

    Vcap

    75747372717069686766

    6465

    63626160595857565554535251

    50494847464544434241403938373635343332313029282726

    9

    1112

    43

    78 77

    2423

    181716151413

    5678

    10

    7980

    12

    22212019

    25

    76

    PIC32MX460F512L100pin TQFP

    81828384858687888990919293949596979899100

    RB11

    RB10

    RB9

    RB8

    RB13

    RB12

    RE7RC1RC2RC3

    RD9RD8

    RA15

    D+/RG2

    RB15

    RB14

    RF8VBUSVUSB

    D-/RG3

    VSS

    VDD

    RA6

    RG0

    RG1

    RE0

    RF1

    RF0

    RD7

    RD6

    RE6RE5

    RE2

    RG13

    RG12

    RG14 RE1

    RA7

    RG8

    RA9

    RB2RB3RB4RB5RE9RE8

    RD11RD10

    RF2RF3

    RG9

    RG7RG6

    RA1

    RE3

    RE4

    RG15VDD

    RB7

    RB6

    RB0RB1

    RF4

    RF5

    RA14

    RA5

    RD14

    RD15

    RA2

    RF13

    VDD

    RA3

    VDD

    VDD

    RA0VDDVSS

    VSS

    RF12

    RA4

    VSS

    VCAP

    /VD

    DCO

    RE

    AVSS

    AVD

    DRA

    10

    MCLR

    RC4

    OSC1/RC12OSC2/RC15

    RD0

    RD3

    RD1

    SOSCI/RC13SOSCO/RC14

    VSS

    RD2

    RD12

    RD13

    RD4

    RD5

    U1

    RESET#

    RF5-

    UAR

    T2_T

    XRF

    4-U

    ART2

    _RX

    VCC-3.3V

    RB14

    -AN

    14RB

    13-A

    N13

    RB12

    -VSE

    NSE

    RB11

    -AN

    11RB

    10-A

    N10

    RB15

    -AN

    15

    AVCC

    RB7-

    PGD

    2RB

    6-PG

    C2

    RB8-

    AN8

    RE3-

    LD1

    RE4-

    T2

    RF13

    -SEN

    SEL

    RF12

    -GPI

    O

    RA9-

    GPI

    O

    RG9-T3

    RA10

    -LD

    2

    8MHz

    22pF

  • 5. Power management and battery chargerClicker 2 for PIC18FJ features

    LTC3586-1, a highly integrated power management and battery charger IC

    that includes a current limited switching

    PowerPath manager. LTC3586 also

    enables battery charging over a USB connection.

    Figure 5-1: power management and battery charger IC

    Page 20

  • Page 21

    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-2:8MHz crystal oscillator module (X1)

    Figure 6-1:32.768kHz crystal oscillator module (X2)

    6. Oscillators

  • Page 22

    VCC-3.3VAVCC

    FP1

    C1

    100nF

    C2

    2.2uF

    OSC2OSC1 X1

    C5

    22pF

    C6

    X2

    32.768KHzC34

    22pF

    C33

    22pF

    OSC32_INOSC32_OUT

    E1

    10uF

    Vcap

    75747372717069686766

    6465

    63626160595857565554535251

    50494847464544434241403938373635343332313029282726

    9

    1112

    43

    78 77

    2423

    181716151413

    5678

    10

    7980

    12

    22212019

    25

    76

    PIC32MX460F512L100pin TQFP

    81828384858687888990919293949596979899100

    RB11

    RB10

    RB9

    RB8

    RB13

    RB12

    RE7RC1RC2RC3

    RD9RD8

    RA15

    D+/RG2

    RB15

    RB14

    RF8VBUSVUSB

    D-/RG3

    VSS

    VDD

    RA6

    RG0

    RG1

    RE0

    RF1

    RF0

    RD7

    RD6

    RE6RE5

    RE2

    RG13

    RG12

    RG14 RE1

    RA7

    RG8

    RA9

    RB2RB3RB4RB5RE9RE8

    RD11RD10

    RF2RF3

    RG9

    RG7RG6

    RA1

    RE3

    RE4

    RG15VDD

    RB7

    RB6

    RB0RB1

    RF4

    RF5

    RA14

    RA5

    RD14

    RD15

    RA2

    RF13

    VDD

    RA3

    VDD

    VDD

    RA0VDDVSS

    VSS

    RF12

    RA4

    VSS

    VCAP

    /VD

    DCO

    RE

    AVSS

    AVD

    DRA

    10

    MCLR

    RC4

    OSC1/RC12OSC2/RC15

    RD0

    RD3

    RD1

    SOSCI/RC13SOSCO/RC14

    VSS

    RD2

    RD12

    RD13

    RD4

    RD5

    U1

    VCC-3.3V

    AVCC

    8MHz

    22pF

    VCC-3.3V

    C40

    10uF

    C9

    100nF

    VCC-3.3V

    C10

    100nF

    VCC-3.3V

    C11

    100nF

    VCC-3.3V

    C36

    100nF

    VCC-3.3V

    C37

    100nF

    VCC-3.3V

    C35

    100nF

    VCC-3.3V

    C12

    100nF

    VCC-3.3V

    The use of crystal in all other schematics is implied even if it is purposely left out, because of the schematics clarity.

    Figure 6-3: Crystal

    oscillator schematic

    NOTE

  • 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.

    Figure 7-1: Connecting USB cable to clicker 2

    7. USB connection

    Page 23

  • Page 24

    VCC-3.3VAVCCFP1

    C1

    100nF

    C2

    2.2uF

    C2610nF

    FP2FERRITER24 100 1

    2345 GND

    IDD+D-VBUS

    CN2

    USB MINIB

    USB-D_NUSB-D_P

    VCC-USB

    USB-DET

    USB-ID

    OSC2OSC1 X1

    C5

    22pF

    C6

    X2

    32.768KHzC34

    22pF

    C33

    22pF

    OSC32_INOSC32_OUT

    E1

    10uF

    Vcap

    75747372717069686766

    6465

    63626160595857565554535251

    50494847464544434241403938373635343332313029282726

    9

    1112

    43

    78 77

    2423

    181716151413

    5678

    10

    7980

    12

    22212019

    25

    76

    PIC32MX460F512L100pin TQFP

    81828384858687888990919293949596979899100

    RB11

    RB10

    RB9

    RB8

    RB13

    RB12

    RE7RC1RC2RC3

    RD9RD8

    RA15

    D+/RG2

    RB15

    RB14

    RF8VBUSVUSB

    D-/RG3

    VSS

    VDD

    RA6

    RG0

    RG1

    RE0

    RF1

    RF0

    RD7

    RD6

    RE6RE5

    RE2

    RG13

    RG12

    RG14 RE1

    RA7

    RG8

    RA9

    RB2RB3RB4RB5RE9RE8

    RD11RD10

    RF2RF3

    RG9

    RG7RG6

    RA1

    RE3

    RE4

    RG15VDD

    RB7

    RB6

    RB0RB1

    RF4

    RF5

    RA14

    RA5

    RD14

    RD15

    RA2RF

    13

    VDD

    RA3

    VDD

    VDD

    RA0VDDVSS

    VSS

    RF12

    RA4

    VSS

    VCAP

    /VD

    DCO

    RE

    AVSS

    AVD

    DRA

    10

    MCLR

    RC4

    OSC1/RC12OSC2/RC15

    RD0

    RD3

    RD1

    SOSCI/RC13SOSCO/RC14

    VSS

    RD2

    RD12

    RD13

    RD4

    RD5

    U1

    USB-D_NUSB-D_P

    USB-DET

    R28R29

    VCC-3.3V

    AVCC

    J2

    RF3-GPIOUSB-ID-RF3

    USB-ID-RF3

    USB-ID

    8MHz

    22pF

    VCC-3.3V

    C40

    10uF

    C9

    100nF

    VCC-3.3V

    C10

    100nF

    VCC-3.3V

    C11

    100nF

    VCC-3.3V

    C36

    100nF

    VCC-3.3V

    C37

    100nF

    VCC-3.3V

    C35

    100nF

    VCC-3.3V

    C12

    100nF

    VCC-3.3V

    Figure 7-2: USB module connection schematic

  • Page 25

    VCC-3.3VAVCCFP1

    C1

    100nF

    C2

    2.2uF

    HDR2

    RXTX

    SDASCL

    PWM

    VCC-3.3V

    RESET#

    RF5-UART2_TXRF4-UART2_RX

    RA2-I2C2_SCLRA3-I2C2_SDA

    RD0-PWM1

    RD1-PWM2RD2-PWM3RD3-PWM4

    RD12-GPIORD13-GPIORD5-GPIORD6-GPIORD7-GPIORF0-GPIORF1-GPIO

    RG14-GPIO

    RG0-GPIORA6-GPIORA7-GPIORE0-GPIO

    VCC-3.3V

    C40

    10uF

    C9

    100nF

    C10

    100nF

    C11

    100nF

    VCC-3.3V VCC-3.3V VCC-3.3V

    C12

    100nF

    C35

    100nF

    VCC-3.3V

    C36

    100nF

    VCC-3.3V

    C37

    100nF

    VCC-3.3VVCC-3.3V

    OSC2OSC1 X1

    C5

    22pF

    C6

    X2

    32.768KHzC34

    22pF

    C33

    22pF

    OSC32_INOSC32_OUT

    E1

    10uF

    RB9-

    AN9

    Vcap

    RG8_SPI2_MOSI

    RG6_SPI2_SCKRG7_SPI2_MISO

    75747372717069686766

    6465

    63626160595857565554535251

    50494847464544434241403938373635343332313029282726

    9

    1112

    43

    78 77

    2423

    181716151413

    5678

    10

    7980

    12

    22212019

    25

    76

    PIC32MX460F512L100pin TQFP

    81828384858687888990919293949596979899100

    RB11

    RB10

    RB9

    RB8

    RB13

    RB12

    RE7RC1RC2RC3

    RD9RD8

    RA15

    D+/RG2

    RB15

    RB14

    RF8VBUSVUSB

    D-/RG3

    VSS

    VDD

    RA6

    RG0

    RG1

    RE0

    RF1

    RF0

    RD7

    RD6

    RE6RE5

    RE2

    RG13

    RG12

    RG14 RE1

    RA7

    RG8

    RA9

    RB2RB3RB4RB5RE9RE8

    RD11RD10

    RF2RF3

    RG9

    RG7RG6

    RA1

    RE3

    RE4

    RG15VDD

    RB7

    RB6

    RB0RB1

    RF4

    RF5

    RA14

    RA5

    RD14

    RD15

    RA2

    RF13

    VDD

    RA3

    VDD

    VDD

    RA0VDDVSS

    VSS

    RF12

    RA4

    VSS

    VCAP

    /VD

    DCO

    RE

    AVSS

    AVD

    DRA

    10

    MCLR

    RC4

    OSC1/RC12OSC2/RC15

    RD0

    RD3

    RD1

    SOSCI/RC13SOSCO/RC14

    VSS

    RD2

    RD12

    RD13

    RD4

    RD5

    U1

    R9

    R7RESET#

    RF8-UART1_TXRF2-UART1_RX

    RF5-

    UAR

    T2_T

    XRF

    4-U

    ART2

    _RX

    RA2-I2C2_SCLRA3-I2C2_SDA

    RD4-

    MB1

    -PW

    M5

    RD0-PWM1

    RD1-

    PWM

    2RD

    2-PW

    M3

    RD3-

    PWM

    4

    USB-D_NUSB-D_P

    USB-DET

    R28R29

    VCC-3.3V

    RB14

    -AN

    14RB

    13-A

    N13

    RB12

    -VSE

    NSE

    RB11

    -AN

    11RB

    10-A

    N10

    RB15

    -AN

    15

    AVCC

    RB7-

    PGD

    2RB

    6-PG

    C2

    RD12

    -GPI

    ORD

    13-G

    PIO

    RD5-

    GPI

    ORD

    6-G

    PIO

    RD7-

    GPI

    O

    RB8-

    AN8

    RF0-

    GPI

    ORF

    1-G

    PIO

    RG0-

    GPI

    ORA

    6-G

    PIO

    RA7-

    GPI

    ORE

    0-G

    PIO

    RE2-

    MB1

    _RST

    RG13

    -MB1

    _CS

    RE3-

    LD1

    RG12

    -GPI

    O

    RE4-

    T2

    RE8-MB1-INT1RE9-MB2-INT2

    RF13

    -SEN

    SEL

    RB1-MB2_CSRB2-MB2_RST

    RB4-MB2_AN4

    RB0-MB1_AN0

    RF12

    -GPI

    O

    RA4-GPIO

    RD8-GPIORD9-GPIO

    RE6-GPIO

    RA14-INT3RA15-INT4

    RG14

    -GPI

    O

    RG15-STAT

    RA9-

    GPI

    O

    RA0-GPIO

    RG9-T3

    J2

    RF3-GPIOUSB-ID-RF3

    USB-ID-RF3

    USB-ID

    RA10

    -LD

    2

    8MHz

    22pF

    HDR1

    AN

    INT

    VCC-3.3V

    SCKSDI

    SDO

    VSYS

    RG8_SPI2_MOSI

    RG6_SPI2_SCKRG7_SPI2_MISO

    RA14-INT3RA15-INT4

    RE8-MB1-INT1RE9-MB2-INT2

    RB14-AN14RB13-AN13

    RB15-AN15

    RB9-AN9

    RB11-AN11RB10-AN10

    RB8-AN8

    RF12-GPIO

    RF3-GPIO

    RA4-GPIORD8-GPIORD9-GPIO

    RE6-GPIO

    RA9-GPIO

    RA0-GPIO

    Most microcontroller pins are available for further connectivity via two 1x26 rows of connection

    pads on both sides of the clicker 2 for PIC32MX 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

    8. Pads

  • Page 26

    VSYSRSTGNDGNDRB15RB14RB13RD1RB11RD2RB10RD3RB9RD0RB8RD12RA14RD13RA15RD5RE9RD6RE8RD7RF12RF0RD9RF1RD8RG0RA4RA6RA9RA7RF3RE0RA0RG14RE6RF4RG6RF5RG7RA2RG8RA33.3V3.3VGNDGND

    SPI LinesInterrupt LinesAnalog LinesDigital lines I2C Lines UART lines PWM lines

    Reset pin System power supplyReference Ground Reference Ground

    3.3V power supplyReference 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

    9. Pinout

  • RF4RE9RD0

    RF2

    RD4

    RF5

    RF8

    RE8

    RA2

    5V

    RA2

    5V

    RA3

    RD5

    RA3

    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

    UART2 lines

    UART1 lines

    I2C2 lines

    I2C2 lines

    RG6

    RB4

    RG6

    RB0

    3.3V

    RG7

    3.3V

    RB2

    RG7

    RE2

    GND

    RG8

    GND

    RB1

    RG8

    RG13

    SPI2lines

    SPI2lines

    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

    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 The default position of the jumper is for

    applications when youre 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

    9.1 PWM jumper selection

  • 9.2 RF3/USBID Jumper selection

    Figure 9-3:RF3/USBID jumper

    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.

  • 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: Figure 10-1: clicker 2 for PIC32MX driving click boardswww.mikroe.com/click

    10. click boards are plug and play!

    Page 29

  • Page 30

    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 31

    11. Dimensions

  • Page 32

    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, 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.

  • Clicker 2 for PIC32MX manualver 1.02

    0100000070901

    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]