Download mikromedia for dsPIC33EP User Manual
Transcript
mikromedia for dsPIC33EP ™ ® Compact development system rich with on-board peripherals for all-round multimedia development on dsPIC33EP512MU810 device. TO OUR VALUED CUSTOMERS I want to express my thanks to you for being interested in our products and for having confidence in Mikroelektronika. The primary aim of our company is to design and produce high quality electronic products and to constantly improve the performance thereof in order to better suit your needs. Nebojsa Matic General Manager The dsPIC® 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 dsPIC33EP® 4 Programming with mikroProg™ programmer 16 Package Contains 5 mikroProg Suite™ for PIC® Software 17 Key Features 6 Programming with ICD2 or ICD3 programmer 18 System Specification 1. Power supply USB power supply Battery power supply ® ® 7 4. Reset Button 20 8 5. Crystal Oscillator 22 8 6. MicroSD Card Slot 23 8 7. Touch Screen 24 10 8. Audio Module 26 10 9. USB connection 28 3. Programming the microcontroller 11 10. Accelerometer 30 Programming with mikroBootloader 12 2. dsPIC33EP512MU810 microcontroller Key microcontroller features 11. Flash Memory 31 step 1 – Connecting mikromedia 12 12. Pads 32 step 2 – Browsing for .HEX file 13 13. Pinout 33 step 3 – Selecting .HEX file 13 14. Dimensions 34 step 4 – Uploading .HEX file 14 15. mikromedia Accessories 35 step 5 – Finish upload 15 16. What’s Next 36 Page 3 Introduction to mikromedia for dsPIC33EP® The mikromedia for dsPIC33EP® 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 dsPIC33EP512MU810 microcontroller. The mikromedia for dsPIC33EP features integrated modules such as stereo MP3 codec, TFT 320x240 touch screen display, accelerometer, USB connector, audio connector, MMC/SD card slot, 8 Mbit flash memory, 2x26 connection pads and other. It comes preprogrammed 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 fits in the palm of the hand, which makes it convenient platform for mobile devices. Page 4 Package Contains 20122011 www.mikroe.com 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. 01 Damage resistant protective box 02 mikromedia for dsPIC33EP® development system 04 mikromedia for dsPIC33EP® user’s guide 05 mikromedia for dsPIC33EP® schematic Page 5 03 DVD with documentation and examples 06 USB cable Key Features 09 01 Connection Pads 02 TFT 320x240 display 03 USB MINI-B connector 04 CHARGE indication LED 05 LI-Polymer battery connector 01 06 3.5mm headphone connector 07 Power supply regulator 08 Serial Flash memory 09 RESET button 10 VS1053 Stereo mp3 coder/decoder 11 dsPIC33EP512MU810 microcontroller 12 Accelerometer 02 13 Crystal oscillator 14 Power indication LED 15 microSD Card Slot 16 ICD2/3 connector 17 mikroProg connector Page 6 04 03 05 System Specification 06 power supply 07 Via USB cable (5V DC) 08 power consumption 10 75 mA with erased MCU (when on-board modules are inactive) board dimensions 11 81.2 x 60.5mm (3.19 x 2.38 inch) 12 weight 13 ~50 g (0.11 lbs) 14 15 16 17 Page 7 1. Power supply 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 power supply. Figure 1-1: Connecting USB 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. Figure 1-2: Connecting Li-Polymer battery Page 8 VCC-SYS VCC-USB DATA BUS CN3 FP2 FERRITE PMEG3010ER D1 DMP2160UW M1 C28 10nF VCC-BAT VREF-1.8 R49 4K7 2.2uF 1 2 3 FERRITE E11 10uF 10uF U3 Vout Vin GND EN ADJ R47 220K 5 4 R46 100K MIC5205-ADJ R50 0R VCC-3.3 R35 10K E10 VCC-1.8 VCC-1.8 FP3 R34 4K7 VCC-3.3 VCC-1.8 C29 R6 4K7 HDR1 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 M1X26 USB MINIB VCC-3.3 VCC-BAT VCC-SYS VBUS DD+ ID GND R43 10K CN1 BATT CONN VSENSE 1 2 3 4 5 VCC-3.3 Figure 1-3: Power supply schematics R39 4K7 HDR2 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 M1X26 VCC-3.3 VCC-3.3 LD2 CHARGE VCC-3.3 VCC-BAT R36 10K STAT R37 10K Q4 BC846 Q5 BC846 R38 10K E5 10uF R45 1K 1 2 3 VCC-SYS E7 C40 10uF U5 2.2uF STAT VSS VBAT PROG VDD 2K2 5 4 MCP73832 Charging Current approx. 250mA Page 9 VCC-SYS R26 R44 3K9 LD1 POWER E3 10uF VCC-3.3 3 2 E4 10uF REG1 Vin Vout GND LD29080DT33 1 2. dsPIC33EP512MU810 microcontroller The mikromedia for dsPIC33EP® development system comes with the dsPIC33EP512MU810 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 70 MIPS 16-bit 16-bit ALU Address Generation 17x17 MPY - Up to 70 MIPS Operation; dsPIC33EP Barrel Shifter JTAG Register File 16x16 Address Bu s - 16-bit architecture; Flash (512KB) - 512KB of program memory, 24KB of auxiliary flash; RAM (53,248 KB DMA ) - 53.248 Bytes of RAM memory; Data Bus - 83 I/O pins; USB OTG PMP - Internal Oscillator 7.37 MHz, 32kHz; RTCC Timers RTCC - nanoWatt features: Fast Wake/Fast Control; Analog PORT Comp. (A ,B,C,D,E,F) - 4-UART, 4-SPI, 2-I2C, 2-CAN, USB 2.0 OTG; - DAC, ADC, etc. Page 10 ECAN ADC Input Capture UART Comp SPI PWM I2C Output Compare 3. Programming the microcontroller Figure 3-1: dsPIC33EP512MU810 microcontroller The microcontroller can be programmed in three ways: 01 Over USB HID mikroBootloader 02 Using mikroProg™ external programmer 03 Using ICD2/3 external programmer Page 11 Programming with mikroBootloader step 1 – Connecting mikromedia You can program the microcontroller with bootloader which is pre-programmed into the device by default. To transfer .hex file from a PC to MCU you need bootloader software (mikroBootloader USB HID) which can be downloaded from: http://www.mikroe.com/eng/downloads/get/1859/ mikrobootloader_dspic33ep_usbhid_v200.zip 01 After software is downloaded unzip it to desired location and start mikroBootloader USB HID software. Figure 3-2: USB HID mikroBootloader window 01 To start, connect the USB cable, or if already connected 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 2 – Browsing for .HEX file step 3 – Selecting .HEX file 01 01 02 Figure 3-3: Browse for HEX Figure 3-4: Selecting HEX 01 Click the ”Browse for HEX” button and from a pop-up window (Figure 3.4) choose the .HEX file which will be uploaded to MCU memory. 01 Select .HEX file using open dialog window. 02 Click the ”Open” button. Page 13 step 4 – Uploading .HEX file 01 01 Figure 3-5: Begin uploading Figure 3-6: Progress bar 01 To start .HEX file boot loading click the ”Begin uploading” button. 01 You can monitor .HEX file uploading via progress bar Page 14 step 5 – Finish upload 01 Figure 3-7: Restarting MCU Figure 3-8: mikroBootloader ready for next job 01 Click the ”OK” button after uploading is finished and wait for 5 seconds. Board will automatically reset and your new program will execute. Page 15 Programming with mikroProg™ programmer 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. mikroProg™ is a 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. Figure 3-9: Connecting mikroProg™ to mikromedia™ Page 16 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 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 first soldered on the CN5 connector. Then you should plug the ICD2® or ICD3® programmer into it, Figure 3-11. Page 18 E9 10uF VCC-3.3 1 2 3 4 5 PGC1 PGD1 MCLR# VCC-3.3 CN6 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 M1X5 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 dsPIC33EP512MU810 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 100 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 C30 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 SOSCO SOSCI 22pF X3 32.768KHz C31 22pF C2 CLKO CLKI 22pF X1 8MHz C1 22pF VCC-3.3 MCLR# PGD1 PGC1 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 R7 RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 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 6 5 4 3 2 1 CN5 PGC1 PGD1 M1X6 VREF-1.8 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 E8 C5 C6 C7 C8 C34 10uF 100nF 100nF 100nF 100nF 100nF decoupling capacitors Figure 3-13: mikroProg™ & ICD2 / ICD3 programmer connection schematic Page 19 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 You can also solder additional reset button on the appropriate place at the back side of the board, Figure 4-1. Figure 4-2: Frontal reset button Figure 4-1: Location of additional reset button Page 20 VCC-3.3 R8 10K HDR2 RST E9 T2 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 C3 100nF 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 10uF T1 dsPIC33EP512MU810 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 100 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 C30 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 22pF SOSCO SOSCI X3 22pF C2 22pF CLKO CLKI X1 VCC-3.3 8MHz C1 M1X26 22pF VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 E8 C5 C6 C7 C8 C34 10uF 100nF 100nF 100nF 100nF 100nF VREF-1.8 Figure 4-3: Reset circuit schematic Page 21 32.768KHz C31 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 R7 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 RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 U1 decoupling capacitors 5. Crystal oscillator 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. E9 VCC-3.3 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 10uF VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 dsPIC33EP512MU810 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 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 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 RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 U1 VREF-1.8 C30 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 SOSCO SOSCI X3 C5 C6 C7 C8 C34 10uF 100nF 100nF 100nF 100nF 100nF 32.768KHz C31 22pF C2 CLKO CLKI E8 22pF 22pF X1 decoupling capacitors Figure 5-1: External crystal oscillator (X1) 8MHz C1 22pF Figure 5-2: Crystal oscillator schematic NOTE : 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 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. E9 SD-CD# 10uF 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 dsPIC33EP512MU810 C30 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 SOSCO SOSCI 22pF X3 E8 C5 C6 C7 C8 C34 10uF 100nF 100nF 100nF 100nF 100nF 32.768KHz decoupling capacitors C31 22pF C2 VCC-MMC VCC-3.3 FP1 CLKO CLKI 22pF X1 FERRITE 8MHz C38 100nF C1 E6 10uF 22pF VCC-MMC R11 10K R10 10K SCK2-RG6 MISO2-RG7 SD-CD# CN4 VCC-MMC R9 10K SD-CS# MOSI2-RG8 R16 27 CS Din +3.3V SCK GND Dout CD GND 27 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 SD-CS# 27 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 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 SCK2-RG6 R4 MISO2-RG7 MOSI2-RG8 R5 RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 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 Figure 6-1: microSD card slot VREF-1.8 Figure 6-2: microSD Card Slot module connection schematic Page 23 Figure 6-3: Inserting microSD card 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 different colors. Figure 7-1: Touch Screen Page 24 E9 VCC-3.3 VCC-SYS LCD-BLED PMRD PMWR PMD1 PMD0 PMD4 PMD3 PMD2 10uF Q1 BC846 VCC-3.3 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 VCC-SYS RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 dsPIC33EP512MU810 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 Q2 BC846 BAT43 C30 SOSCO SOSCI X3 C31 22pF C2 VCC-3.3 22pF CLKO CLKI X1 LCD-RS LCD-CS# LCD-YU LCD-XL LCD-YD LCD-XR LCD-RST 32.768KHz PMD7 PMD6 PMD5 PMD4 PMD3 PMD2 PMD1 PMD0 E13 10uF 8MHz C1 22pF VCC-3.3 VCC-3.3 R24 10K R25 10K LCD-RST LCD-CS# VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VREF-1.8 R40 12 Q3 BC846 22pF VCC-3.3 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 PMD5 PMD6 PMD7 LCD-RST 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 1K D2 LCD-BLED U1 R23 E8 C5 C6 C7 C8 C34 10uF 100nF 100nF 100nF 100nF 100nF C21 47nF C22 R41 300K 47nF VCC-3.3 R42 300K LCD-XL LCD-YU decoupling capacitors Figure 7-2: Touch Screen connection schematic Page 25 PMRD PMWR LCD-RS LCD-CS# LCD-XR LCD-YD LCD-XL LCD-YU 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 TFT1 LED-K LED-A1 LED-A2 LED-A3 LED-A4 IM0 IM1 IM2 IM3 RESET VSYNC HSYNC DOTCLK ENABLE DB17 DB16 DB15 DB14 DB13 DB12 DB11 DB10 DB9 DB8 DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 SDO SDI RD WR/SCL RS CS FMARK VCC-IO VCC VCC-I GND XR YD XL YU MI0283QT2 8. Audio Module Figure 8-1: On-board VS1053 MP3 codec Figure 8-2: Inserting 3.5mm headphones jack The mikromedia for dsPIC33EP® 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 E9 MP3-CS# MP3-DCS 10uF VCC-1.8 VCC-1.8 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-1.8 VCC-1.8 C4 C9 C10 C11 C12 C23 C24 C26 C27 100nF 100nF 100nF 100nF 100nF 100nF 100nF 100nF 100nF VCC-3.3 22pF X3 32.768KHz C31 22pF C2 VCC-1.8 MP3-DCS 22pF C20 22pF 13 14 15 16 17 18 19 20 21 22 23 24 R1 1M C6 C7 C8 C34 10uF 100nF 100nF 100nF 100nF 100nF GPIO7 GPIO6 GPIO3 GPIO2 DREQ CVDD1 IOVDD0 CVDD0 DGND0 XRESET MICN MCP/LN1 U2 22pF C19 XDCS/BSYNC IOVDD1 VC0 DGND1 XTAL0 XTAL1 IOVDD2 DGND2 DGND3 DGND4 XCS CVDD2 VS1053 GPIO5 RX TX SCLK SI SO CVDD3 XTEST GPIO0 GPIO1 GND GPIO4 R19 10K 25 26 27 28 29 30 31 32 33 34 35 36 MP3-CS# MP3-RST# R2 10K decoupling capacitors R20 10K VCC-3.3 R21 10K Figure 8-3: Audio module connection schematic Page 27 R32 12 11 10 9 8 7 6 5 4 3 2 1 C1 R22 27 MISO2-RG7 C5 E2 10uF C18 3.3nF R R18 100K 8MHz SCK2-RG6 MOSI2-RG8 X1 MP3-RST# MP3-DREQ GPIO E8 R33 22pF MP3-CS# VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 470 CLKO CLKI VCC-3.3 VREF-1.8 MP3-RS T# SOSCO SOSCI X2 dsPIC33EP512MU810 C30 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 12.288MHz 27 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 27 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 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 SCK2-RG6 R4 MISO2-RG7 MOSI2-RG8 R5 RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 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 MP3-DR EQ 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 decoupling capacitors LN2 AGND3 LEFT AVDD2 RCAP AVDD1 GBUF AGND2 AGND1 RIGHT AVDD0 AGND0 E1 470 48 47 46 45 44 43 42 41 40 39 38 37 LEFT LEFT RIGHT GBUF 10uF C17 3.3nF L R17 100K R28 10 R29 10 CN2 PHONEJACK RIGHT R30 20 R31 20 R27 10 C13 C15 C16 C14 1uF 10nF 10nF 47nF 9. USB connection dsPIC33EP512MU810 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 E9 VCC-3.3 10uF 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 VCC-3.3 VCC-3.3 VCC-3.3 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 dsPIC33EP512MU810 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 C30 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 SOSCO SOSCI C5 C6 10uF 100nF 100nF 32.768KHz VCC-3.3 VCC-3.3 VCC-3.3 C31 22pF C2 CLKO CLKI E8 22pF X3 C7 C8 C34 100nF 100nF 100nF 22pF X1 decoupling capacitors 8MHz C1 22pF USBDP USBDM VCC-USB USB-DET CN3 FP2 FERRITE USB-ID 1 2 3 4 5 USBDM USBDP USB-ID R14 100 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 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 RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 U1 USB-DET VREF-1.8 Figure 9-2: USB module connection schematic Page 29 C28 10nF VBUS DD+ ID GND USB MINIB 10. Accelerometer On board ADXL345 accelerometer is used to measure acceleration in three axis: x, y and z. The accelerometer’s function is defined by the user in the program loaded into the microcontroller. Communication between the accelerometer and the microcontroller is performed via the I2C interface. E9 VCC-3.3 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 10uF VCC-3.3 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 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 dsPIC33EP512MU810 C30 R13 10K VCC-3.3 22pF C31 1 2 3 4 5 6 22pF C2 22pF CLKO CLKI X1 8MHz 10uF ADXL345 VCC-3.3 C33 100nF 22pF VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 E8 SCL2-RA2 SDA2-RA3 13 12 ACC ADDRESS 11 10 VCC-3.3 9 8 SDA ADD Res NC INT2 INT1 VCC-3.3 C1 SDA2-RA3 SCL2-RA2 VCC GND Res GND GND VCC C5 C6 C7 C8 C34 100nF 100nF 100nF 100nF 100nF decoupling capacitors R12 10K U9 3 32.768KHz 1 X3 2 SOSCO SOSCI 14 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 SCL GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 CS RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 7 RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 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 J1 C32 100nF Figure 10-2: Accelerometer connection schematic VREF-1.8 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 E9 10uF 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 VCC-3.3 27 27 dsPIC33EP512MU810 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 C30 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 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 SCK2-RG6 R4 MISO2-RG7 MOSI2-RG8 R5 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 FLASH-CS# RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 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 SOSCO SOSCI 22pF X3 32.768KHz C31 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 22pF C2 CLKO CLKI 22pF X1 E8 C5 C6 C7 C8 C34 10uF 100nF 100nF 100nF 100nF 100nF Figure 11-1: Flash memory module 8MHz C1 decoupling capacitors 22pF VCC-3.3 VCC-3.3 R48 10K FLASH-CS# MISO2-RG7 C37 VCC-3.3 1 2 3 4 CS SDO WP GND M25P80 VREF-1.8 Figure 11-2: Flash memory module connection schematic Page 31 100nF U10 VCC HOLD SCK SDI 8 7 6 SCK2-RG6 5 MOSI2-RG8 Since multimedia applications are getting increasingly demanding, it is necessary to provide additional memory space to be used for storing more data. The flash memory module enables the microcontroller to use additional 8Mbit flash memory. It is connected to the microcontroller via the Serial Peripheral Interface (SPI). 12. Pads E9 TX-RD1 RD7 RD6 RG0 RG1 RF1 RF0 RG14 RD13 RD12 RX-RD3 VCC-3.3 VCC-SYS 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 RG13 10uF RST L R RF2 RF4 RF5 RF8 RF13 RA0 RA1 RE8 RE9 RD8 RD9 RD11 RG0 RG1 RF0 RF1 RX-RD3 TX-RD1 SCL2-RA2 SDA2-RA3 VCC-3.3 M1X26 RC4 SCK2-RG6 R4 MISO2-RG7 MOSI2-RG8 R5 R7 RST RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 27 27 100 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 RG15 VDD RE5 RE6 RE7 RC1 RC2 RC3 RC4 RG6/SCK2 RG7/SDI2 RG8/SDO2 MCLR RG9 GND VCC RA0 RE8 RE9 RB5 RB4 RB3 RB2 RB1 RB0 dsPIC33EP512MU810 GND SOSCO/RC14 SOSCI/RC13 RD0 RD11 RD10 RD9 RD8 ASDA1/RA15 ASCL1/RA14 GND CLKO/RC15 CLKI/RC12 VCC RA5 RA4 ASDA2/RA3 ASCL2/RA2 D+/RG2 D-/RG3 Vusb Vbus RF8 RF2 USBID/RF3 RB6/PGEC1 RB7/PGED1 RA9/VrefRA10/Vref+ AVCC AGND RB8 RB9 RB10 RB11 GND VCC RA1 RF13 RF12 RB12 RB13 RB14 RB15 GND VCC RD14 RD15 RF4 RF5 HDR2 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 RE4 RE3 RE2 RG13 RG12 RG14 RE1 RE0 RA7 RA6 RG0 RG1 RF1 RF0 ENVREG VCAP RD7 RD6 RD5 RD4 RD13 RD12 RD3 RD2 RD1 U1 HDR1 C30 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 RB0 RB1 RB2 RB3 RB4 RB5 RB9 RD6 RD7 RD12 RD13 RA14 RA15 RD10 RC4 RD0 RB14 RG13 RG14 SCK2-RG6 MISO2-RG7 MOSI2-RG8 22pF SOSCO SOSCI RD0 RD11 RD10 RD9 RD8 RA15 RA14 X3 32.768KHz C31 22pF C2 22pF CLKO CLKI X1 8MHz C1 SDA2-RA3 SCL2-RA2 22pF RF8 RF2 VCC-3.3 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 M1X26 RF4 RF5 RB14 RA1 RF13 VREF-1.8 RB9 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 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 VCC-3.3 E8 C5 C6 C7 C8 C34 10uF 100nF 100nF 100nF 100nF 100nF decoupling capacitors Pads HDR1 Pads HDR2 Figure 12-1: Connection pads schematic 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. Page 32 13. Pinout 5V power supply Reference Ground Analog Lines Interrupt Lines Digital I/O lines SCK2 SPI2 SDI2 SDO2 3.3V power supply Reference Ground 5V GND RB0 RB1 RB2 RB3 RB4 RB5 RB9 RD6 RD7 RD12 RD13 RA14 RA15 RD10 RC4 RD0 RB14 RG13 RG14 RG6 RG7 RG8 3.3V GND RST GND L R RF2 RF4 RF5 RF8 RF13 RA0 RA1 RE8 RE9 RD8 RD9 RD11 RG0 RG1 RF0 RF1 RD3 RD1 RA2 RA3 3.3V GND Reset pin Reference Ground left ch. audio out right ch. PWM lines Digital I/O lines RX UART TX SCL2 I2C SDA2 3.3V power supply Reference Ground Pin functions Pin functions Digital lines Analog Lines Interrupt Lines SPI Lines Page 33 I2C Lines UART lines PWM lines 14. Dimensions 81.15 mm (3195 mils) 73.66 mm (2900 mils) 36.58 mm (1440 mils) 2.03 mm (80 mils) 7.62 mm (300 mils) 55.88 mm (2200 mils) 60.45 mm (2380 mils) 8.89 mm (350 mils) 63.5 mm (2500 mils) 2.54 mm (100 mils) Page 34 2.67 mm (105 mils) 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 offer other accessories, such as Li-polymer battery, stacking headers, wire jumpers and more. 04 Gaming shield 01 Connect shield 02 BatteryBoost shield 05 mikroBUS shield 06 Li-Polimer battery Page 35 03 07 PROTO shield Wire Jumpers What’s next? You have now completed the journey through each and every feature of mikromedia for dsPIC33EP 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 find 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® 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 first applications. Projects Once you have chosen your compiler, and since you already got the board, you are ready to start writing your first 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 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 modification of this manual is prohibited. MikroElektronika provides this manual ‘as is’ without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties or conditions of merchantability or fitness for a particular purpose. MikroElektronika shall assume no responsibility or liability for any errors, omissions and inaccuracies that may appear in this manual. In no event shall MikroElektronika, its directors, officers, employees or distributors be liable for any indirect, specific, incidental or consequential damages (including damages for loss of business profits and business information, business interruption or any other pecuniary loss) arising out of the use of this manual or product, even if MikroElektronika has been advised of the possibility of such damages. MikroElektronika reserves the right to change information contained in this manual at any time without prior notice, if necessary. HIGH RISK ACTIVITIES The products of MikroElektronika are not fault – tolerant nor designed, manufactured or intended for use or resale as on – line control equipment in hazardous environments requiring fail – safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines or weapons systems in which the failure of Software could lead directly to death, personal injury or severe physical or environmental damage (‘High Risk Activities’). MikroElektronika and its suppliers specifically disclaim any expressed or implied warranty of fitness for High Risk Activities. TRADEMARKS The MikroElektronika name and logo, the MikroElektronika logo, mikroC™, mikroBasic™, mikroPascal™, mikroProg™, EasyPIC Fusion™, 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 identification or explanation and to the owners’ benefit, with no intent to infringe. Copyright © MikroElektronika, 2012, All Rights Reserved. Page 39 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 [email protected] mikromedia for dsPIC33EP Manual ver. 1.00 0 100000 020432