mikroElektronika Mikromedia PIC24EP User Manual

mikromedia
for PIC24EP
Compact development system rich with on-board peripherals for all-round multimedia development on PIC24EP512GU810 device.
®
PIC24
TO OUR VALUED CUSTOMERS
I want to express my thanks to you for being interested in our products and for having
condence 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 PIC24EP® 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 mikromedia for PIC24EP® 4
Package Contains 5
Key Features 6
System Specication 7
1. Power supply 8
USB power supply 8
Battery power supply 8
2. PIC24EP512GU810 microcontroller 10
Key microcontroller features 10
3. Programming the microcontroller 11
Programming with mikroBootloader 12
step 1 – Connecting mikromedia 12
step 2 – Browsing for .HEX le 13
step 3 – Selecting .HEX le 13
step 4 – Uploading .HEX le 14
step 5 – Finish upload 15
Programming with mikroProg™ programmer 16
mikroProg Suite™ for PIC® Software 17
Programming with ICD2® or ICD3® programmer 18
4. Reset Button 20
5. Crystal Oscillator 22
6. MicroSD Card Slot 23
7. Touch Screen 24
8. Audio Module 26
9. USB connection 28
10. Accelerometer 30
11. Flash Memory 31
12. Pads 32
13. Pinout 33
14. Dimensions 34
15. Mikromedia Accessories 35
16. What’s Next 36
Introduction to mikromedia for PIC24EP
The mikromedia for PIC24EP® is a compact development system with lots of on-board peripherals which allow development of devices with multimedia contents. The central part of the system is a 16-bit PIC24EP512GU810 microcontroller. The mikromedia for PIC24EP® features integrated modules such as stereo MP3 codec, TFT 320x240 touch screen display, accelerometer, USB connector, audio connector,
MMC/SD card slot, 8 Mbit ash memory, 2x26
connection pads and other. It comes pre­programmed with USB HID bootloader, but can also be programmed with external programmers, such as mikroProg™ or ICD2/3. Mikromedia is
compact and slim, and perfectly ts in the palm
of the hand, which makes it convenient platform for mobile devices.
®
Package Contains
Copyright ©2011 Mikroelektronika.
All rights reserved. Mikroelektronika, Mikroelektronika logo and other
Mikroelektronika trademarks are the property of Mikroelektronika. All other trademarks are the property of their respective owners.
Unauthorized copying, hiring, renting, public performance and
broadcasting of this DVD prohibited.
20122011
www.mikroe.com
Damage resistant
01
protective box
mikromedia for PIC24EP®
04 05
user’s guide
mikromedia for PIC24EP®
02
development system
mikromedia for PIC24EP® schematic
DVD with documentation
03
and examples
USB cable
06
Key Features
01
Connection Pads
02
TFT 320x240 display
03
USB MINI-B connector
04
CHARGE indication LED
05
LI-Polymer battery connector
06
3.5mm headphone connector
07
Power supply regulator
08
Serial Flash memory
09
RESET button
10
VS1053 Stereo mp3 coder/decoder
11
PIC24EP512GU810 microcontroller
12
Accelerometer
13
Crystal oscillator
14
Power indication LED
15
microSD Card Slot
ICD2/3 connector
16
mikroProg connector
17
09
01
02
03
04
05
06
System Specication
16
07
11
08
13
17
14
12
10
15
power supply
Via USB cable (5V DC)
power consumption
73 mA with erased MCU
(when on-board modules are inactive)
board dimensions
81.2 x 60.5mm (3.19 x 2.38 inch)
weight
~50 g (0.11 lbs)
1. Power supply
Battery power supply
You can also power the board using Li-Polymer battery, via on-board battery connector. On-board battery charger circuit MCP73832 enables you to charge the battery over USB connection. LED diode (RED) will indicate when battery is charging. Charging current is ~250mA and charging voltage is 4.2V DC.
USB power supply
You can apply power supply to the board using MINI-B USB cable provided with the board. On-board voltage regulators provide the appropriate voltage levels to each component on the board. Power
LED (GREEN) will indicate the presence of
Figure 1-1: Connecting USB power supply
Figure 1-2: Connecting Li-Polymer battery
power supply.
2 3
5
4
1
VCC-SYS VCC-3.3
E3
10uF
E4 10uF
R26
2K2
2
3
1
GND
Vin
Vout
REG1
LD29080DT33
VCC-BAT
D1
PMEG3010ER
R44 3K9
Charging Current approx. 250mA
R39 4K7
VCC-3.3
E7
10uF
C40
2.2uF
R34 4K7
R6 4K7
VCC-BAT
VSENSE
VCC-SYS
VCC-SYS
R43 10K
R37
10K
R36 10K
VCC-3.3
STAT
R38 10K
R45 1K
VCC-3.3
E5 10uF
R35 10K
VCC-3.3
R49 4K7
M1
DMP2160UW
STAT VSS VBAT VDD
PROG
U5
MCP73832
Q4 BC846
Q5 BC846
C28 10nF
FP2
FERRITE
1 2 3 4 5
GND
ID
D+
D-
VBUS
CN3
USB MINIB
VCC-USB
C29
2.2uF
VCC-3.3
R46 100K
E10
10uF
R47 220K
VCC-1.8
VCC-1.8
R50 0R
1 2 3
5
4
Vin GND EN ADJ
Vout
U3
MIC5205-ADJ
DATA BUS
LD2 CHARGE
LD1
POWER
VCC-BAT
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
HDR1
M1X26
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
HDR2
M1X26
VCC-3.3 VCC-3.3
VCC-SYS
VCC-1.8VREF-1.8
E11 10uF
FP3
FERRITE
CN1 BATT CONN
Figure 1-3: Power supply schematics
Page 11
2. PIC24EP512GU810 microcontroller
Address Bus
Data Bus
70 MIPS
16-bit
16-bit ALU
17x17 MPY
JTAG
PMP
PORT
(A,B,C,D,E,F)
Analog Comp.
Input
Capture
PWMComp
Output
ADC
UART SPI I2C
Flash
(512KB)
RAM
(53,248 KB)
DMA
Address
Generation
Register File
16x16
Barrel
Shifter
USB
OTG
PIC24EP
Timers
RTCC
ECAN
Compare
The mikromedia for PIC24EP® development system comes with the
PIC24EP512GU810 microcontroller. This high-performance 16-bit
microcontroller with its integrated modules and in combination with other on-board modules is ideal for multimedia applications.
Key microcontroller features
- Up to 70 MIPS Operation;
- 16-bit architecture;
- 512KB of program memory, 24KB of auxiliary ash;
- 53.248 Bytes of RAM memory;
- 83 I/O pins;
- Internal Oscillator 7.37 MHz, 32kHz; RTCC
- nanoWatt features: Fast Wake/Fast Control;
- 4-UART, 4-SPI, 2-I2C, 2-CAN, USB 2.0 OTG;
- DAC, ADC, etc.
Page 10
3. Programming the microcontroller
The microcontroller can be programmed in three ways:
Over USB HID mikroBootloader
01
Using mikroProg™ external programmer
02
Using ICD2/3 external programmer
03
Page 11
Figure 3-1: PIC24EP512GU810 microcontroller
Page 13
Programming with mikroBootloader
You can program the microcontroller with bootloader which is pre-programmed into the device by default. To transfer
.hex le from a PC to MCU you need bootloader software
(mikroBootloader USB HID) which can be downloaded from:
http://www.mikroe.com/eng/downloads/get/1858/ mikrobootloader_pic24ep_usbhid_v200.zip
After software is downloaded unzip it to desired location and start mikroBootloader USB HID software.
step 1 – Connecting mikromedia
01
Figure 3-2: USB HID mikroBootloader window
To start, connect the USB cable, or if already connected
01
press the Reset button on your mikromedia board. Click the
”Connect” button within 5s to enter the bootloader mode,
otherwise existing microcontroller program will execute.
Page 12
step 3 – Selecting .HEX le step 2 – Browsing for .HEX le
01
01
Figure 3-3: Browse for HEX Figure 3-4: Selecting HEX
02
Click the ”Browse for HEX” button and from a
01 01
pop-up window (Figure 3.4) choose the .HEX le which will be uploaded to MCU memory.
Page 13
02
Select .HEX le using open dialog window.
Click the ”Open” button.
Page 15
step 4 – Uploading .HEX le
01
Figure 3-5: Begin uploading Figure 3-6: Progress bar
01
To start .HEX le bootloading click the
01 01
”Begin uploading” button.
Page 14
You can monitor .HEX le uploading via progress bar
step 5 – Finish upload
01
Figure 3-7: Restarting MCU
Click the ”OK” button after uploading is nished
01
and wait for 5 seconds. Board will automatically reset and your new program will execute.
Figure 3-8: mikroBootloader ready for next job
Page 15
Page 17
Programming with mikroProg
programmer
Figure 3-9: Connecting mikroProg™ to mikromedia™
The microcontroller can be programmed with mikroProg™
programmer and mikroProg Suite™ for PIC® software. The
mikroProg™ programmer is connected to the development system via the CN6 connector, Figure 3-9.
fast USB 2.0 programmer
with mikroICD™ hardware
In-Circuit Debugger. Smart engineering
allows mikroProg™ to support PIC10®,
PIC12®, PIC16®, PIC18®, 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 it’s key features.
Page 16
mikroProg™ is a
mikroProg Suite™ for PIC® Software
mikroProg™ programmer requires
special programming software called
mikroProg Suite™ for PIC®. 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 PIC® programming software
Page 17
Page 19
Programming with
ICD2® or ICD3® programmer
The microcontroller can be also programmed with ICD2®
or ICD3® programmer. These programmers connects
with mikromedia board via ICD2 CONNECTOR BOARD.
Figure 3-12:
Connecting ICD2®
or ICD3® programmer
Figure 3-11:
Placing ICD2®
connector
In order to enable the ICD2® and ICD3® programmers to be connected to the
mikromedia board, it is necessary to provide the appropriate connector such as the
ICD2 CONNECTOR BOARD. This connector should be rst soldered on the CN5 connector.
Then you should plug the ICD2® or ICD3® programmer into it, Figure 3-11.
Page 18
302928
27
34
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
VCC-3.3
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
VREF-1.8
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
10uF
CLKO
CLKI
SOSCO
SOSCI
PGC1
PGD1
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGE D1
RB6/PGE C1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vre f+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
decoupling capacitors
VCC-3.3
1 2 3 4 5
CN6
M1X5
MCLR#
PGD1 PGC1
VCC-3.3
MCLR#
PGD1
PGC1
6 5 4 3 2 1
CN5
M1X6
MCLR#
Figure 3-13: mikroProg™ & ICD2 / ICD3 programmer connection schematic
Page 19
Page 21
4. Reset Button
Board is equipped with reset button, which is located at the top of the front side (Figure 4-2). If you want to reset the circuit, press the reset button. It will generate low voltage level on microcontroller reset pin (input). In addition, a reset can be externally provided through pin 27 on side headers (Figure 4-3).
NOTE
Figure 4-1: Location of additional reset button
You can also solder additional reset button on the appropriate place at the back side of the board, Figure 4-1.
Page 20
Figure 4-2: Frontal reset button
302928
27
34
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
R7 100
VCC-3.3
VREF-1.8
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
E9
10uF
CLKO
CLKI
SOSCO
SOSCI
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGE D1
RB6/PGE C1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vre f+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
R8 10K
VCC-3.3
C3 100nF
T1T2
RST
VCC-3.3
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
HDR2
M1X26
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling capacitors
Figure 4-3: Reset circuit schematic
Page 21
Page 23
5. Crystal oscillator
3029282734
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
VCC-3.3
VREF-1.8
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
E9
10uF
CLKO
CLKI
SOSCO
SOSCI
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGED1
RB6/PGEC1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vref+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling capacitors
Board is equipped with 8MHz crystal oscillator
(X1) circuit that provides external clock waveform
to the microcontroller CLKO and CLKI 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. Board also contains 32.768kHz Crystal oscillator
(X3) which provides external clock for internal RTCC module.
Figure 5-2: Crystal oscillator schematic
NOTE :
Figure 5-1:
External crystal
oscillator (X1)
The use of crystal in all other schematics is implied even if it is purposely left out because of the schematics clarity.
Page 22
6. microSD Card Slot
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling capacitors
SD-CS#
R11
10K
R10
10K
VCC-MMC
R9 10K
SD-CD#
VCC-MMC
R16
27
VCC-3.3
E6 10uF
C38 100nF
FP1
FERRITE
CS Din
+3.3V
SCK GND Dout
CD
GN
D
CN4
MOSI2-RG8
SCK2-RG6
MISO2-RG7
VCC-MMC
3029282734
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
VCC-3.3
R5 27
R4 27
VREF-1.8
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
SD-CD#
E9
10uF
CLKO
CLKI
SOSCO
SOSCI
SD-CS#
MISO2-RG7 MOSI2-RG8
SCK2-RG6
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGED1
RB6/PGEC1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vref+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
Board contains microSD card slot for using microSD cards in your projects. It enables you to store large amounts of data externally, thus saving microcontroller memory. microSD cards use Serial Peripheral Interface (SPI) for communication with the microcontroller.
Figure 6-2: microSD Card Slot module connection schematic
Page 23
Inserting microSD card
microSD card slot
Figure 6-3:
Figure 6-1:
Page 25
7. Touch Screen
The development system features a TFT 320x240 display covered with a resistive touch panel. Together they form a functional unit called a touch screen. It enables data to be entered and displayed at the same time. The TFT display is capable of showing graphics in 262.144 die rent colors.
Figure 7-1: Touch Screen
Page 24
R23
1K
VCC-SYS
VCC-3.3
E13 10uF
R25 10K
VCC-3.3
R24 10K
LCD-RST LCD-CS#
VCC-3.3
LCD-BLED
R40 12
VCC-SYS
D2
BAT43
2
15
12
35
11
36
3 4 5 6
14
7 8 9
13
43
33
10
37 38 39 40
44 45 46
34
1
47
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
41 42
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
DB8
DB9
DB10
DB11
DB12
DB13
DB14
DB15
DB16
DB17
ENABLE
DOTCLK
HSYNC
VSYNC
RESET
IM0 IM1 IM2 IM3
LED-A1 LED-A2 LED-A3 LED-A4
LED-K
SDO SDI RD WR/SCL RS CS FMARK VCC-IO VCC VCC-I GND XR YD XL YU
TFT1
MI0283QT2
VCC-3.3
LCD-YU
LCD-XL
Q3 BC846
Q2 BC846
Q1 BC846
C22
47nF
R42 300K
C21
47nF
R41 300K
LCD-RST
LCD-RS LCD-CS#
LCD-YU
LCD-XL
LCD-YD
LCD-XR
PMRD PMWR
PMD0
PMD1
PMD2
PMD3
PMD4
PMD5
PMD6
PMD7
VCC-3.3 VCC-3.3
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling capacitors
302928
27
34
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
VCC-3.3
VREF-1.8
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
PMRD
PMWR
PMD4
PMD3
PMD2
PMD1
PMD0
LCD-BLED
E9
10uF
CLKO
CLKI
SOSCO
SOSCI
LCD-RS
LCD-CS#
LCD-YU
LCD-XL
LCD-YD
LC
D-XR
LCD-RST
PMD5 PMD6 PMD7
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGE D1
RB6/PGE C1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vre f+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
Figure 7-2: Touch Screen connection schematic
Page 25
Page 27
8. Audio Module
Figure 8-1:
On-board VS1053
MP3 codec
Figure 8-2: Inserting 3.5mm headphones jack
The mikromedia for PIC24EP® features stereo audio codec VS1053. This module enables audio reproduction by using stereo headphones connected to the system via a 3.5mm connector CN2. All functions of this module are controlled by the microcontroller over Serial Peripheral Interface (SPI).
Page 26
decoupling capacitors
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling capacitors
302928
27
34
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
VCC-3.3
R5 27
R4 27
VREF-1.8
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
MP3-DCS
MP3-CS#
E9
10uF
CLKO
CLKI
SOSCO
SOSCI
MP3-DREQ
MP3-RST#
MISO2-RG7 MOSI2-RG8
SCK2-RG6
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGED1
RB6/PGEC1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vref+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
576
8
901
2
345
6
MP3-CS#
C20 22pF
C19 22pF
R1 1M
R20 10K
R21
10K
MP3-DR E Q
MP3-RST#
R2 10K
R19 10K
X2
12.288MHz
C13
1uF
VCC-3.3
GPIO
VCC-3.3
LEFT
RIGHT
GBUF
C4
100nFC9100nF
VCC-1.8 VCC-1.8
C11
100nF
C10
100nF
VCC-1.8 VCC-1.8
C12
100nF
C23
100nF
VCC-3.3
C24
100nF
VCC-3.3
C26
100nF
VCC-3.3 VCC-3.3
C27
100nF
VCC-3.3
E1 10uF
E2 10uF
CN2
PHONEJACK
LEFT
RIGHT
C16
10nF
C14
47nF
C15
10nF
R27 10
R3020R31
20
R28 10
R29 10
R32
470
C17
3.3nF
R17 100K
R33
470
C18
3.3nF
R18 100K
L
R
R22 27
234
5671112
13 14
2
24
23
22
21
18
17
16
15
8
1
19
9
102
2
20
223333333
37
38
39
40
41
42
43
44
45
46
47
48
MCP/LN1
MICN
XRESET
DGND0
CVDD0
IOVDD0
CVDD1
DREQ
GPIO2
GPIO3
GPIO6
GPIO7
XDCS/BSYNC IOVDD1 VC0 DGND1 XTAL0 XTAL1 IOVDD2 DGND2 DGND3 DGND4 XCS CVDD2
GPIO5
RXTXSCLK
SI
SO
CVDD3
XTEST
GPIO0
GPIO1
GND
GPIO4
AGND0
AVDD0
AVDD2
AGND1
AGND2
AGND3
LN2
LEFT
RCAP
AVDD1
GBUF
RIGHT
VS1053
U2
VCC-1.8 VCC-3.3
MP3-CS#
MP3-RS T #
MP3-DCS
MOSI2-RG8
SCK2-RG6
MISO2-RG7
Page 27
Figure 8-3: Audio module connection schematic
Page 29
9. USB connection
PIC24EP512GU810 microcontroller has
integrated USB module, which enables you to implement USB communication functionality to your mikromedia board. Connection with target USB host is done over MINI-B USB connector which is positioned next to the battery connector.
Figure 9-1: Connecting
USB cable to MINI-B
USB connector
Page 28
302928
27
34
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
USBDP
USBDM
VCC-USB
C28 10nF
FP2
FERRITE
USB-DET
VCC-3.3
R14 100
1 2 3 4 5
GND
ID
D+
D-
VBUS
CN3
USB MINIB
VREF-1.8
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
E9
10uF
CLKO
CLKI
USB-DET
USBDP
USBDM
SOSCO
SOSCI
USB-ID
USB-ID
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGE D1
RB6/PGE C1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vre f+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
C5
100nFC6100nF
E8
10uF
VCC-3.3 VCC-3.3VCC-3.3
C7
100nF
VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling
capacitors
Figure 9-2: USB module connection schematic
Page 29
Page 31
3029282734
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
C32 100nF
C33 100nF
VCC-3.3
R12 10K
R13 10K
VCC-3.3
1
2
3
J1
ACC ADDRESS
1 2 3 4 5 6
7
8
9
10
11
12
13
14
VCC GND Res GND GND VCC
CS
INT1
INT2
NC
Res
ADD
SDA
SCL
U9
ADXL345
VCC-3.3
VCC-3.3 VCC-3.3
VCC-3.3
VREF-1.8
SCL2-RA2
SDA2-RA3
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
E9
10uF
CLKO
CLKI
SOSCO SOSCI
SDA2-RA3
SCL2-RA2
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGED1
RB6/PGEC1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vref+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling capacitors
10. Accelerometer
On board ADXL345 accelerometer is used to measure acceleration in three axis: x, y and z. The
accelerometer function is dened by the user in the
program loaded into the microcontroller. Communication between the accelerometer and the microcontroller is performed via the I2C interface.
Figure 10-2: Accelerometer connection schematic
Page 30
Figure 10-1:
Accelerometer
module
You can set the accelerometer address to 0 or 1 by re-soldering the SMD jumper (zero-ohm resistor) to the appropriate position. Jumper is placed in address 1 position by default.
11. Flash Memory
3029282734
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
FLASH-CS#
C37
100nF
R48 10K
VCC-3.3
VCC-3.3
VCC-3.3
VCC-3.3
R5 27
R4 27
1 2 3
54
6
7
8
CS SDO WP GND SDI
SCK
HOLD
VCC
U10
M25P80
VREF-1.8
MOSI2-RG8
SCK2-RG6
MISO2-RG7
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
E9
10uF
CLKO
CLKI
SOSCO
SOSCI
MISO2-RG7
FLASH-CS#
MOSI2-RG8
SCK2-RG6
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGED1
RB6/PGEC1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vref+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling capacitors
Figure 11-2: Flash memory module connection schematic
Figure 11-1:
Page 31
Since multimedia applications are getting increasingly demanding, it is necessary to provide additional memory space to be used for storing more data.
The ash memory module enables the
microcontroller to use additional 8Mbit
ash memory. It is connected to the
microcontroller via the Serial Peripheral Interface (SPI).
Flash memory module
Page 33
3029282734
33
46
36
35
424344
45
37
504849
32
38
39
40
41
47
31
26
9
11 12
4
3
24
23
18
17
16
15
14
13
5 6 7 8
10
1 2
22
21
20
19
25
78
777980
76
8182838485
8687888990
91929394959697
9899100
58 57 56 55 54 53 52
72
69 68 67 66 65 64 63 62 61 60 59
71
51
70
75 74 73
VCC-3.3VCC-3.3
VCC-SYS
R7 100
VCC-3.3
R5 27
R4 27
VREF-1.8
C30
22pF
C31
22pF
X3 32.768KHz
C2
22pF
C1
22pF
X1 8MHz
RG14
RX-RD3
RG
1
3
TX-
RD1
RD7
RD6
RD13
RD12
RG0
RG1
RF0
RF1
E9
10uF
CLKO CLKI
SOSCO
SOSCI
RD11
RD8
SDA2-RA3
SCL2-RA2
RD9
RF8 RF2
RA14
RA15
RD0
RD10
RB9
RF4
RF5
RB14
RF13
RA1
RC4
MISO2-RG7
RB4
RB5
RB3 RB2 RB1 RB0
RE9
RA0 RE8
MOSI2-RG8
SCK2-RG6
RB4
RB9
RB5
RB3
RB2
RB1
RG14
RG13
RD7
RD6
RD13
RD12
MOSI2-RG8
MISO2-RG7
RD0
RD10 RC4
RB14
RB0
RA14 RA15
SCK2-RG6
RE9
RA0
RE8
RF4 RF5
RX-RD3
RD11
RD8
TX-RD1
RST
RD9
RF13
RA1
L R
RG0 RG1 RF0 RF1
RF8
RF2
SDA2-RA3
SCL2-RA2
HDR1
M1X26
HDR2
M1X26
PIC24EP512GU810
R
B11
RB10
RB9
RB8
RB13
R
B12
RE7 RC1 RC2 RC3
ASDA1/RA15
D+/RG2
RB15
RB14
RF8
Vbus
Vusb
D-/RG3
GND
VCC
RA6
RG0
RG1
RE0
RF1
RF0
RD7
RD6
RE6
RE5
RE2
RG13
RG12
RG14
RE1
RA7
RG8/SDO2
RA9/Vref-
RB1
RB2
RB3
RB4
RB5
RE9
RD9 RD8
RF2
USBID/RF3
GND
RG7/SDI2
RG6/SCK2
RA1
RE3
RE4
RG15 VDD
RB7/PGED1
RB6/PGEC1
RB0
RF4
RF5
ASCL1/RA14
RA5
RD14
RD15
ASCL2/RA2
RF13
VCC
ASDA2/RA3
VCC
ENVREG
RE8
RA0
VCC
GND
RF12
RA4
GND
VCAP
AGND
AVCC
RA10/Vref+
MCLR
RC4
CLKI/RC12
CLKO/RC15
RD10
RD3
RD1
SOSCI/RC13
SOSCO/RC14
GND
RD2
RD12
RD13
RD4
RD5
RG9
RD11
RD0
U1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
RST
C5
100nFC6100nFC7100nF
E8
10uF
VCC-3.3 VCC-3.3 VCC-3.3VCC-3.3
C8
100nF
VCC-3.3
C34
100nF
VCC-3.3
decoupling capacitors
12. Pads
Pads HDR2
Most microcontroller pins are available for further connectivity via two 1x26 rows of connection pads on both sides of the mikromedia board. They are designed to match additional shields, such as Battery Boost shield, Gaming, PROTO shield and others.
Figure 12-1: Connection pads schematic
Page 32
Pads HDR1
13. Pinout
5V RST Reset pin5V power supply GND GND Reference GroundReference Ground
RB0 L RB1 R
Analog Lines
Interrupt Lines
Digital I/O lines
SCK2
SDI2
SPI2
SDO2
Pin functions Pin functions
RB2 RF2 RB3 RF4 RB4 RF5 RB5 RF8 RB9 RF13
RD6 RA0 RD7 RA1
RD12 RE8 RD13 RE9
RA14 RD8 RA15 RD9 RD10 RD11
RC4 RG0
RD0 RG1
RB14 RF0 RG13 RF1 RG14
RG6 RG7 RA2 RG8 RA3
3.3V 3.3V 3.3V power supply3.3V power supply GND GND Reference GroundReference Ground
RD3 RD1
left ch. right ch.
PWM lines
Digital I/O lines
RX TX
SCL2 SDA2
audio out
UART
2
C
I
Digital lines
Page 33
SPI LinesInterrupt LinesAnalog Lines
I2C Lines
UART lines
PWM lines
Page 35
73.66 mm
81.15 mm
63.5 mm
2.67 mm2.54 mm
36.58 mm
55.88 mm
60.45 mm
2.03 mm
(3195 mils)
(2900 mils)
(2380 mils)
(2200 mils)
(2500 mils)
(1440 mils)
(105 mils)(100 mils)
(80 mils)
8.89 mm
(350 mils)
7.62 mm
(300 mils)
14. Dimensions
Page 34
15. mikromedia accessories
We have prepared a set of extension boards pin-compatible with your mikromedia, which enable you to easily expand your board basic functionality. We call them mikromedia
shields. But we also oer other
accessories, such as Li-polymer battery, stacking headers, wire
01 02
jumpers and more.
Connect shield BatteryBoost shield PROTO shield
03
04
Gaming shield
05
mikroBUS shield
Page 35
06 07
Li-Polimer battery Wire Jumpers
Page 37
What’s next?
You have now completed the journey through each and every feature of mikromedia for PIC24EP board. You got to know it’s modules and organization. Now you are ready to start using your new board. We are suggesting several steps which are probably the best way to begin. We
invite you to join the users of mikromedia™ brand. You will nd very useful projects and tutorials and can get help from a large ecosystem of
users. Welcome!
Compiler
You still don’t have an appropriate compiler? Locate dsPIC/PIC24® compiler that suits you best on the Product DVD provided with the package:
DVD://download/eng/software/compilers/
Choose between mikroC™, mikroBasic™ and mikroPascal™ and download fully functional
demo version, so you can begin building your rst applications.
Projects
Once you have chosen your compiler, and since you already got the board, you are ready to start writing your rst
projects. Visual TFT software for rapid development of graphical user interfaces enables you to quickly create your GUI. It will automatically create necessary code which is compatible with mikroElektronika compilers. Visual TFT is rich with examples, which are an excellent starting point for your future projects. Just load the example, read well commented code, and see how it works on hardware. Visual TFT is also available on the Product DVD.
Page 36
Notes:
Page 37
Page 39
Notes:
Page 38
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 modication 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 tness 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, ocers, employees or distributors be liable for any indirect, specic, incidental or consequential damages (including damages for loss of business prots 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 hazard-
ous environments requiring fail – safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air trac
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 specically disclaim any expressed or implied warranty of tness for High
Risk Activities.
TRADEMARKS
The MikroElektronika name and logo, the MikroElektronika logo, mikroC™, mikroBasic™, mikroPascal™, mikroProg™, EasyPIC™, mikroBUS™, Click Boards™, mikroProg™, 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 identication or explanation and to the owners’ benet, with no intent to infringe.
Copyright © MikroElektronika, 2012, All Rights Reserved.
Page 39
mikromedia for PIC24EP Manual
ver. 1.00
0 100000 020401
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/esupport
If you have any questions, comments or business proposals,
do not hesitate to contact us at oce@mikroe.com
Loading...