Page 1
dsPIC33
A compact starter kit with your favorite microcontroller and two mikroBUS™ sockets
dsPIC
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 dsPIC® 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
Introduction to clicker 2 for dsPIC33 4
Key features 5
Schematic 6
1. Power supply 7
2. dsPIC33EP512MU810 microcontroller 8
3. Programming the microcontroller 9
3.1 Programming with mikroBootloader 10
step 1 – Connecting clicker 2 for dsPIC 10
step 2 – Browsing for .HEX file 11
step 3 – Selecting .HEX file 11
step 4 – Uploading .HEX file 12
step 5 – Finish upload 13
3.2 Programming with mikroProg programmer 14
mikroProg Suite for PIC® software 15
4. Buttons and LEDs 16
5. Power management and battery charger 17
6. Oscillators 18
7. USB connection 19
8. Pinout 20
8.1 mikroBUS™ pinout 21
9. click boards™ are plug and play! 22
10. Dimensions 23
Table of contents
Page 4
clicker 2 for dsPIC33 is a compact development
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 dsPIC33EP512MU810,
a 16-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 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, I
2C, UART, RST, PWM, Analog and Interrupt lines as
well as 3.3V, 5V and GND power lines. clicker 2 for
dsPIC33 board can be powered over a USB cable.
Introduction to clicker 2 for dsPIC33
Page 5
1 ON/OFF switch
2 8 MHz crystal oscillator
3 two 1x26 connection pads
4 mikroBUS™ sockets 1 and 2
5 Pushbuttons
6 Additional LEDs
7 LTC3586 USB power manager IC
8 Power and Charge indication LEDs
9 RESET button
10 Micro USB connector
11 dsPIC33EP512MU810 MCU
12 Li-Polymer battery connector
13 mikroProg programmer connector
14 32.768 KHz crystal oscillator
9
10
11
3
4
5
6
12
13
1
2
3
14
4
5
6
8
7
Key features
Page 6
clicker 2 for dsPIC33 schematic
ANRSTCSSCKMISOMOSI3.3VGND
PWMINTRXTX
SCLSDA
5VGND
ANRSTCSSCKMISOMOSI3.3VGND
PWMINTRXTX
SCLSDA
5VGND
ILIM
01
ILIM
12
LDO
3V3
3
CLPR
OG
4
NTC
5
VOU
T46
VOU
T 47
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
VCC-3.3VVCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3VVCC-BAT
VCC-3.3VVCC-3.3V VCC-3.3V
VSYS VSYS
LDO3V3
VCC-USB
VCC-5VVCC-5V
VCC-BAT
LD4BREDR15
2.2k
R18
3.3k
R16
10k
R20
10k
R231.69k
R2716.9k
R2688.7k
R22105k
R19324k
C24300pF
LDO3V3LDO3V3
VCC-BAT
VSYSVCC-USB
VCC-3.3V
VCC-USB
VCC-5V
LDO3V3
VSYS
VCC-5V VCC-5V
VCC-3.3V VCC-3.3V
VCC-3.3V
PWR-EN PWR-EN
VCC-3.3V VCC-3.3V
VCC-5V VCC-3.3V
R8470
1
2
3
4
5
6
SW1JS202011AQN
LDO3V3
R171k
PWR-EN
VCC-3.3VVcap
1 2
VCC-3.3V VCC-5V VCC-5VVCC-3.3V
VCC-3.3V VCC-3.3V
VSYS
RESET#
RB8-AN8RB9-AN9RB10-AN10RB11-AN11RB13-AN13RB14-AN14RB15-AN15
RC1-MB1-INT1RC2-MB2-INT2RC3-INT3RC4-INT4
R1
2.2k
R2
2.2k
R310k
R510k
R610k
R4
1k
T2 T3VCC-3.3V VCC-3.3V USB-DETUSB-D_NUSB-D_PUSB-ID-RF3
R24 100
C2610n
FP2FERRITE
VCC-USB
C2
2.2µF
FP1
C5
22pF
C33
22pF
C6
22pF
C34
22pF
VCC-3.3V
VCC-3.3V AVCC
VCC-BAT VCC-BAT
R11
1k
R101M
R14100k
R13100k
R12100k
T1
X2
32.768kHz
C9
0.1µF
C10
0.1µF
C11
0.1µF
C12
0.1µF
C35
0.1µF
C36
0.1µF
C37
0.1µF
C250.1µF
C18
0.1µF
C1
0.1µF
C3
0.1µF
C13
0.1µF
C30
22µF
C14
22µF
C40
10µF
C32
10µF
C38
2.2µF
C15
1µF
C7
1µF
C29
10pF
C27
1µF
C21
33pFC23 10pF
VCC-3.3V
VCC-3.3V
X1
8MHz
VCC-3.3V
RE5-UART1-TXRE6-UART1-RX
RC1-MB1-INT1RC2-MB2-INT2RC3-INT3RC4-INT4RG6-SPI2-SCKRG7-SPI2-MISORG8-SPI2-MOSIRESET#
RB2-MB2-AN2RB1-MB2-RSTRB0-MB2-CS
RB3-MB1-CSRB4-MB1-RSTRB5-MB1-AN5
RB6-
PGC1
RB7-
PGD
1
RB8-
AN8
R B9-
A N9
R B10
-AN
10RB
11-A
N11
AVCC
RB13
-AN
13RB
14-A
N14
R B15
-AN
15
RF4_
I2C2
_SD
ARF
5_I2
C2_S
CL
USB-ID-RF3
USB-DET
USB-D_NUSB-D_P
OSC32_INOSC32_OUT
OSC2OSC1
RG15-STAT
RE9-T3
RESET#
RESET#RB7-PGD1RB6-PGC1
RD0-UART2-TXRD11-UART2-RX
RE4-
UAR
T3-T
XRE
3-U
ART3
-RX
RD9-I2C1-SDARD10-I2C1-SCL
RA1-
SPI1
-MIS
ORF
13-S
PI1-
MO
SIRF
12-S
PI1-
SCK
RE2-
SPI3
-SCK
RG13
-SPI
3-M
OSI
RG12
- SPI
3-M
ISO
RD1-
PWM
1RD
2-PW
M2
RD3-
PWM
3
RD4 -
PWM
4
RD6-
MB1
-PW
M5
RG15-STAT
RE8-T2RA0-LD1
RG9-LD2
RA9-
SEN
SEL
RA10
-VSE
NSE
RA2-GPIORA3-GPIORA4-GPIORA5-GPIO
RA14-GPIORA15-GPIORD8-GPIO
RG1-
GPI
ORG
0-G
PIO
RE0-
GPI
O
RD12
-GPI
ORD
13-G
PIO
RG14
-GPI
O
RF0-
GPI
ORF
1-G
PIO
RA6-
GPI
ORA
7-G
PIO
RE1-
GPI
O
RD7-
GPI
O
RB5-MB1-AN5RB4-MB1-RSTRB3-MB1-CSRF12-SPI1-SCKRA1-SPI1-MISORF13-SPI1-MOSI
RD6-MB1-PWM5RC1-MB1-INT1RE6-UART1-RXRE5-UART1-TX
RB2-MB2-AN2RB1-MB2-RSTRB0-MB2-CSRG6-SPI2-SCKRG7-SPI2-MISORG8-SPI2-MOSI
RD0-UART2-TXRD11-UART2-RXRC2-MB2-INT2
RD1-PWM1RD2-PWM2RD3-PWM3RD4-PWM4
RE0-GPIO
RG0-GPIO
RD12-GPIORD13-GPIO
RD7-GPIO
RG1-GPIO
RF0-GPIORF1-GPIO
RA6-GPIORA7-GPIO
RE1-GPIO
RE3-UART3-RXRE4-UART3-TXRF5_I2C2_SCLRF4_I2C2_SDARG13-SPI3-MOSI
RG12-SPI3-MISORE2-SPI3-SCK
RF8-GPIORD8-GPIORA15-GPIORA14-GPIORA5-GPIORA4-GPIORA3-GPIORA2-GPIO
M1
DMP2305U-7
M2
DMP2305U-7
C4
10µF
RA0-
LD1
RE8-
T2
RE9-
T3
R G9-
LD2
RD5-MB2_PWM6
12345 GND
IDD+D-VBUS
CN2
USB MINIB
C192.2µF
C202.2µF
C31
22µF
C22
22µF
RA9-SENSEL
RA10-VSENSE
R28R29
543
12
HD1
mProg
+-
BATTCONN
CN1
HDR2
R9R7
R30
R31
R32
R33
C1610000pF
C2810000pF
RG14-GPIO
VSYSGND
SCKMISOMOSI3.3VGND
RESET#GND
NCNC
RXTX
SCLSDA3.3VGND
AN
INT
GPIO
GPIO
PWM
HDR1
LD3
R21
15k
L1 3.3µHL2
2.2µH
L32.2µH
RD5-
MB2
_PW
M6
3 0292827 3 433
58575655545352
463635 42 43 44 4 537 50
9
48 49
1112
32
72
69686766656463
43
78 77
2423
181716151413
5678
10
7980
12
22212019
62616059
38 39 40 4 1 47
71
31
51
70
26
25
76
757473
100pin TQFP
818283848 58687888990919 29 394959 6979899100
RB13
RB12
RE7RC1RC2RC3
RD9RD8
RA15
D-/RG3
RB15
RB14
RF2RF8
VBUSVUSB3V3
VSS
VDD
R A6
R G0
RG1
RE0
RF1
RF0
RE6RE5
RE2
RG13
RG12
RG14 RE1
RA7
RG8
RB2RB3RB4RB5RE9RE8
RD11RD10
USBID/RF3
VSS
RG9
RG7RG6
RA1
RE3
RE4
RG15VDD
RB0RB1
RF4
RF5
RA14
RA4
RD14
RD15
D+/RG2
RF13
VDD
RA2
RA5
VDD
RA0VDDVSS
VSS
RF12
RA3
OSC2/RC15MCLR
RC4
VDDOSC1/RC12
RD0
RD3
RD1
RC13RC14VSS
RD2
RD12
RD13
RD4
AVSS
AVD
D
RB9
RB8
RB10
RB1 1
RB7
RA9
RB6
RA10
RD5
RD6
RD7
VCAP
dsPIC33EP512MU810
U1
RF8-GPIO
RD9-I2C1-SDARD10-I2C1-SCL
RD9-I2C1-SDARD10-I2C1-SCL
Page 7
1. Power supply
You can supply power to the board with a micro 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 onboard
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.t
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
2. dsPIC33EP512MU810 microcontroller
The clicker 2 for dsPIC33 development tool comes with the
dsPIC33EP512MU810 device. This 16-bit low power high
performance microcontroller is rich with on-chip peripherals
and features 512 KB of program memory and 53,248 bytes of
RAM. It has integrated full speed USB 2.0. support.
Key MCU features∫ CPU speed: 70 MIPS
∫ 3568 Bytes Data SRAM
∫ Architecture: 16-bit
∫ Program memory: 512KB
∫ Pin count: 100
∫ RAM memory: 53,248 KB
Page 9
∫ Using USB HID mikroBootloader,
∫ Using external mikroProg for dsPIC33 programmer
Figure 3-1:dsPIC33EP512MU810 microcontroller
The microcontroller can be programmed in two ways:
3. Programming the microcontroller
Page 10
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 dsPIC33
01
01
To start, connect the USB cable, or if already connected press the Reset button on your clicker 2 for dsPIC33. 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.
https://download.mikroe.com/examples/starter-boards/clicker-2/dspic33/clicker-2-dspic33-usb-hid-bootloader.zip
clicker 2 for PIC18FK BootloaderWinRAR ZIP archive
clicker 2 for PIC18FK BootloaderFile folder
SoftwareFile folder
mikroBootloader USB HID.exeBootloader tool for mikroElektron...mikroElektronika
clicker 2 for dsPIC dsPIC33EP512MU810 USB HID Bootloader v1.300.hexHEX File
FirmwareFile folder
Page 11
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
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.
clicker2 for dsPIC33.hex HEX.file
01
Page 12
step 4 – Uploading .HEX file
Figure 3-5: Begin uploading Figure 3-6: Progress bar
01
01 01To start .HEX file bootloading click the Begin uploading button.
Progress bar enables you to monitor .HEX file uploading.
01Begin
uploading
Page 13
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 dsPIC33 board and wait
for 5 seconds. Your program will run automatically.
Page 14
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
You can also
program it
with ICD2®
or ICD3® if
you reroute
the wires like
shown here.
4. G
ND5.
VCC
3.3
V6.
MCL
R#
2. P
GC3.
PGD
1. N
C GN
DRE
SET# RB
7RB
6VC
C 3.
3V
ICD2/3programmer
clicker 2 fordsPIC33 1x5programmingheaders
Page 15
mikroProg Suite for dsPIC® software
mikroProg programmer requires
special programming software called
mikroProg Suite for dsPIC®. 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 dsPIC® programming software
dsPIC
Page 16
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
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 (RA0 and RG9). 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 (T2 and T3) from logic high
(1) to logic low (0).03 02 01
Page 17
5. Power management and battery charger
clicker 2 for dsPIC33 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 18
6. Oscillators
Board is equipped with 8MHz crystal oscillator (X1) circuit that provides
external clock waveform to the
microcontroller OSC1 and OSC2 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. And the
32. TK MHz oscillator (X2), a Real-Time
Clock and Calendar (RTCC) module.
Figure 6-1:8MHz crystal oscillator module (X1) and 32.768 KHz crystal oscillator
Page 19
dsPIC33 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.
7. USB connection
Figure 7-1: Connecting USB cable to clicker 2
Page 20
SPI LinesInterrupt LinesAnalog LinesDigital lines I2C Lines UART lines PWM lines
8. PinoutVSYSRSTReset pin System power supplyGNDGNDReference Ground Reference GroundRB15RB14RB13RD1RB11RD2RB10RD3RB9RD4RB8RD13RC1RD12RC2RD7RC3RF0RC4RF1RD9RG1RD8RG0RA15RA6RA14RA7RA5RE0RA4RE1RA3RG14RA2RE3RE2RE4RG12RF5RG13RF43.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
Page 21
RD11RC2RD5
RE6
RD6
RD0
RE5
RC1
RD10
5V
RD10
5V
RD9
RD5
RD9
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
I2C1 lines
I2C2 lines
RG6
RB2
RF12
RB5
3.3V
RG7
3.3V
RB1
RA1
RB4
GND
RG8
GND
RB0
RF13
RB3
SPI2 lines
SPI1 lines
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
8.1 mikroBUS™ pinouts
Digital lines*
SPI LinesInterrupt LinesAnalog LinesDigital lines I2C Lines UART lines PWM lines
Page 22
Up to now, MikroElektronika has released more
than 300 mikroBUS™ compatible click boards™.
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:
https://shop.mikroe.com/click
9. click boards™ are plug and play!
Figure 10-1: clicker 2 for dsPIC33 driving click boards™
Page 23
10. Dimensions
Page 24
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 © 2017 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.
Page 25
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]