mikromedia for PIC18FJ ™ ® Compact development system rich with on-board peripherals for all-round multimedia development on PIC18F87J50 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 PIC®, dsPIC®, PIC24®, PIC32® 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 PIC18FJ® 4 Programing with mikroProg™ programmer 16 Package Contains 5 mikroProg Suite™ for PIC® Software 17 Key Features 6 Programing with ICD2® or ICD3® programmer 18 System Specification 1. Power supply Battery power supply USB power supply 7 4. Reset Button 20 8 5. Crystal oscillator 22 8 6. microSD Card Slot 24 8 7. Touch Screen 26 10 8. Audio Module 28 Key microcontroller features 10 9.
Introduction to mikromedia™ for PIC18FJ® The mikromedia™ for PIC18FJ® 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 8-bit PIC18F87J50 microcontroller. The mikromedia™ for PIC18FJ® 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.
Package Contains Damage resistant protective box mikromedia™ for PIC18FJ® development system 02 mikromedia™ for PIC18FJ® - pinout 01 5V power supply Reference Ground Analog Lines Interrupt Lines Digital I/O lines SCK2 SPI2 SDI2 SDO2 3.3V power supply Reference Ground RST GND L R RC1 RG0 RG3 RG4 RA3 RE1 RE2 RE3 RE4 RE5 RE6 RE7 RB6 RB7 RG2 RG1 RC7 RC6 RD6 RD5 3.3V GND VSYS GND RA2 RA5 RF2 RF5 RF6 RH4 RH6 RB0 RB1 RB2 RB3 RJ0 RJ1 RJ2 RJ3 RJ4 RJ5 RC0 RA4 RC3 RC4 RC5 3.
Key Features 09 01 Connection Pads 02 TFT 320x240 display 03 USB MINI-B connector 04 CHARGE indication LED 05 LI-Polymer battery connector 06 3.
04 03 System Specification 05 06 power supply Via USB cable (5V DC) 07 power consumption 08 52 mA with erased MCU (when back-light is ON) 10 board dimensions 81.2 x 60.5 mm (3.19 x 2.38 inch) 11 weight 12 ~45.5g (0.10lbs) class B product Product complies with the Class B limit of EN 55022 and can be used in the domestic, residential, commercial and industrial environments.
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.
DATA BUS VCC-BAT 1 2 D1 PMEG3010ER M1 DMP2160UW BATT CONN VCC-BAT C28 10nF USB MINIB VCC-3.3 R6 4K7 VCC-1.8 C29 VREF-1.8 VCC-1.8 2.2uF FERRITE E11 10uF R34 4K7 E10 VCC-1.8 FP3 R49 4K7 1 2 3 10uF U3 Vin GND EN Vout ADJ R47 220K 5 4 MIC5250-ADJ R46 100K R35 10K VCC-3.3 R50 0R VCC-3.3 VCC-3.
2. PIC18F87J50 microcontroller The mikromedia™ for PIC18FJ® development system comes with the PIC18F87J50 microcontroller. This high-performance 8-bit microcontroller with its integrated modules and in combination with other on-board modules is ideal for multimedia applications.
3.
Programming with mikroBootloader Microcontroller is preprogrammed with USB HID Bootloader, which can be used to upload new device firmware. To transfer firmware .HEX file from a PC to MCU you need to use mikroBootloader USB HID application, which can be downloaded from: step 1 – Connecting mikromedia http://www.mikroe.com/downloads/get/1682/ mikrobootloader_pic18f87j50_v210.
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.
step 4 – Uploading .HEX file 01 01 Figure 3-5: Begin uploading Figure 3-6: Progress bar 01 In order to upload .HEX file click the Begin uploading button. 01 .HEX file uploading can be monitored via progress bar.
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. The board will be automatically reset and after 5 seconds your new program will be executed.
Programing 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. mikroProg™ is a fast USB 2.0 programmer with mikroICD™ hardware In-Circuit Debugger.
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.
Programing 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-11: Connecting ICD2® or ICD3® programmer In order to enable the ICD2® and ICD3® programmers to be connected to the development system, it is necessary to provide the appropriate connector such as the ICD2 CONNECTOR BOARD. This connector should be first soldered on the CN5 connector.
VCC-3.3 VCC-3.
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.
VCC-3.3 R8 10K RST T2 VCC-3.
5. Crystal oscillator Figure 5-1: Crystal oscillator module 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.
80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 VCC-3.
6. microSD Card Slot Figure 6-1: 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.
PIC18F87J50 RJ2 RJ3 RB0 RB1 RB2 RB3 RB4 RB5 RB6 GND OSC2 OSC1 VCC RB7 RC5 RC4 RC3 RC2 RJ7 RJ6 RH5 RH4 VUSB ENVREG AVCC AGND RA3 RA2 RA1 RA0/AN0 GND VCC RA5 RA4 RC1 RC0 RC6 RC7 RJ4 RJ5 RH2 RH3 RE1 RE0 RG0 RG1 RG2 RG3 MCLR RG4 GND VCCcore/Vcap RF7 RF6 RF5 RF4/D+ RF3/DRF2 RH7 RH6 Vcap 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 VCC-3.
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.
TFT1 VCC-SYS VCC-3.
8. Audio Module The mikromedia™ for PIC18FJ® 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). Figure 8-1: On-board VS1053 MP3 codec Figure 8-2: 3.
63 61 64 62 65 66 67 70 68 69 71 72 73 74 75 76 77 RB3 RG2 RB4 RB5 MCLR RB6 PIC18F87J50 RG4 11 GND 12 GND OSC2 VCCcore/Vcap 13 OSC1 VCC RF7 RF2 RC2 RJ7 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 E9 10uF 21 MP3-RST# MP3-DREQ 12 11 10 9 8 7 6 5 4 3 2 1 56 55 54 MP3-CS# 53 MP3-BSYNC R1 52 51 50 49 48 47 46 R4 56 MISO1-RC4 44 SCK1-RC3 43 41 12.288MHz MP3-CS# MOSI1-RC5 45 42 1M X2 R5 56 VCC-1.8 VCC-1.8 VCC-1.8 VCC-1.
9. USB connection Figure 9-1: Connecting USB cable to MINI-B USB connector PIC18F87J50 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.
80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 VCC-3.
10. Accelerometer Figure 10-1: Accelerometer module On board ADXL345 accelerometer is used to measure acceleration in three axis: x, y and z. The accelerometer function is defined by the user in the program loaded into the microcontroller. Communication between the accelerometer and the 2 microcontroller is performed via the I C interface. You can set the accelerometer address to 0 or 1 by re-soldering the SMD jumper (zero-ohm resistor) to the appropriate position.
Vcap ADXL345 VCC-3.3 VCC-3.3 E9 10uF Figure 10-2: Accelerometer connection schematic Page 33 SCL 7 SDA2-RD5 13 12 ACC ADDRESS 11 VCC-3.
11. Flash Memory Figure 11-1: Flash memory module 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).
80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 VCC-3.
T-D0-RJ0 T-D1-RJ1 SDA2-RD5 SCL2-RD6 RE2 RE3 RE4 RE5 RE6 RE7 12. Pads VCC-3.
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 RST GND L R RC1 RG0 RG3 RG4 RA3 RE1 RE2 RE3 RE4 RE5 RE6 RE7 RB6 RB7 RG2 RG1 RC7 RC6 RD6 RD5 3.3V GND VSYS GND RA2 RA5 RF2 RF5 RF6 RH4 RH6 RB0 RB1 RB2 RB3 RJ0 RJ1 RJ2 RJ3 RJ4 RJ5 RC0 RA4 RC3 RC4 RC5 3.3V GND Reset pin Reference Ground left ch. audio out right ch. PWM lines Digital I/O lines RX UART TX SCL2 2 SDA2 I C 3.
14. Dimensions 1.6 63 73.66 2900 4 157 63.5 2500 2.03 80 7.62 300 43.2 1700 50.2 1976 55.88 2200 60.45 2380 36.58 1440 8.89 350 7 276 81.15 3195 2.54 100 Legend 3.2 126 Page 38 57.6 2268 69.3 2728 2.
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.
What’s next? You have now completed the journey through each and every feature of mikromedia™ for PIC18FJ® 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.
Notes: Page 41
Notes: Page 42
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.
If you want to learn more about our products, please visit our website 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 office@mikroe.com mikromedia for PIC18FJ Manual ver. 1.