Compact development system rich with on-board peripherals for all-round
multimedia development on PIC18F67K40 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.
Page 2
Table of Contents
Introduction to mikromedia for PIC18FK
Package Contains 5
Key Features 6
System Specification 7
1. Power supply 8
Battery power supply 8
USB power supply 8
2. PIC18F67K40 microcontroller 9
Key microcontroller features 9
3. Programming the microcontroller 10
Programming with mikroBootloader 11
step 1 – Connecting mikromedia 11
step 2 – Browsing for .HEX file 12
step 3 – Selecting .HEX file 12
step 4 – Uploading .HEX file 13
step 5 – Finish upload 14
4
Page 3
Programing with mikroProg programmer
mikroProg Suite for PIC® Software 16
Programing with ICD2® or ICD3® programmer 17
4. Reset Button 18
5. microSD Card Slot 19
6. Crystal oscillator 20
7. Audio Module 21
8. Touch Screen 22
9. Accelerometer 23
10. USB connection 24
11. Flash Memory 25
12. Pinouts 26
13. Dimensions 27
14. Schematic 28
15. Mikromedia accessories 32
What’s next? 33
15
Introduction to mikromedia for PIC18FK
Mikromedia for PIC18FK is a compact smart
display and development platform with the
PIC18F67K40 microcontroller from Microchip.
The large 320x240 TF T color display will allow
you to build multimedia applications with speed
and ease. You can use it for development and
as a final product. A 320x240 T FT Color Display
with Touch Screen and S tereo MP3 Codec chip,
microSD™ card, a preprogrammed PIC18FK MCU
and compiler support — you are set for creating
some amazing projects. It comes preprogrammed
with USB bootloader, but can also be programmed
with external programmer s, such as mikroProg™
or ICD2/3. Mikromedia is compac t and slim, and
per fectly fit s in the palm of t he hand, which makes
it convenient platform for mobile devices.
Page 4
Package Contains
Damage resistant
0102
protective box
Two 1x26 male headers and
03
one 1x5 header
Page 5
mikromedia for PIC18FK
development system
USB cable
04
Key Features
01
Connection Pads
02
TFT 320x240 display
03
Micro USB 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
PIC18F87J50 microcontroller
12
Accelerometer
13
Crystal oscillator
14
Power indication LED
15
microSD Card Slot
16
ICD2/3 connector
mikroProg connector
17
09
01
02
Page 6
03
04
05
System Specification
16
13
11
07
12
08
17
14
10
15
06
power supply
Via USB cable (5V DC)
power consumption
52 mA with erased MCU (when back-light is ON)
board dimensions
81.2 x 60.5 mm (3.19 x 2.38 inch)
weight
~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.
CAUTION: Electrostatic Sensitive Device
Permanent damage may occur on devices subjected to high energy
electrostatic discharges which readily accumulate on the human body
or test equipment and can discharge without detection.
Page 7
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
USB power supply - You can apply power
supply to the board using micro 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
Figure 1-2: Connecting Li-Polymer battery
Page 8
2. PIC18F67K40 microcontroller
PIC18F67K40 is a 64-Pin, low-power, high performance
microcontroller with XLP technology. equipped with a 10-bit
ADC with Computation (ADCC) automating Capacitive Voltage
Divider (CVD) techniques for advanced touch sensing, averaging,
filtering, oversampling and performing automatic threshold
comparisons.
Key MCU features
- 128K bytes Program Flash
- 3568 Bytes Data SRAM
- 1024 Bytes Data EEPROM
Sleep mode: Lowest Power Consumption
Page 9
3. Programming the microcontroller
The microcontroller can be programmed in three ways:
Via USB UART mikroBootloader
01
Using mikroProg external programmer
02
Using ICD2/3® external programmer
03
Page 10
Figure 3-1:
PIC18F67K40
microcontroller
3.1 Programming with mikroBootloader
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
Bootloader tool for mikroElektron...
mikroElektronika
Firmware
File folder
PIC18F67K40_Bootloader_Firmware_v100.hex
HEX File
step 1 – Connecting clicker 2 for PIC18FK
01
Figure 3-2: mikroBootloader window
To start, connect the USB cable, or if already connected press
01
the Reset button on your clicker 2 for PIC18FK. Click the Connect
button within 5s to enter the bootloader mode, otherwise existing
microcontroller program will execute.
Figure 3-3: Browse for HEXFigure 3-4: Selecting HEX
01
02
Click the Browse for HEX button and from a
01
pop-up window (Figure 3-4) choose the .HEX file
which will be uploaded to MCU memory.
Page 12
Select .HEX file using open dialog window.
01
Click the Open button.
02
step 4 – Uploading .HEX file
01
Figure 3-5: Begin uploadingFigure 3-6: Progress bar
01
To start .HEX file bootloading click the
0101
Begin uploading button.
Page 13
Progress bar enables you to monitor .HEX file uploading.
step 5 – Finish upload
01
Figure 3-7: Restarting MCU
01
Click OK button after the uploading process is finished.
Press Reset button on clicker 2 for PIC18FK board and wait
02
for 5 seconds. Your program will run automatically.
Figure 3-8: mikroBootloader ready for next job
Page 14
Programing 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.
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
Figure 3-9:
Connecting mikroProg to mikromedia
from Microchip®. Outstanding performance, easy operation and
elegant design are it’s key features.
Page 15
mikroProg is a fast
USB 2.0 programmer with
mikroICD™ hardware In-Circuit
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
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 CONNEC TOR BOARD.
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. Then you
should plug the ICD2® or ICD3® programmer
into it, Figure 3-11.
Figure 3-11:
Connecting ICD2
or ICD3® programmer
®
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.
Figure 4-2: Frontal reset button
Page 18
5. 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.
Figure 6-1: microSD card slot
Page 19
6. Crystal oscillator
Figure 5-1:
Crystal oscillator module
Board is equipped with 16MHz crystal oscillator (Y1) 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.
NOTE :
The use of crystal in all other schematics is implied even if it is purposely left out, because of the schematics clarity.
Page 20
7. Audio Module
Figure 8-1: On-board
VS1053 MP3 codec
Figure 8-2: 3.5mm
headphones jack
The mikromedia for PIC18FK 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 21
8. 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 diffe rent colors.
Figure 7-1: Touch Screen
Page 22
9. 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 microcontroller is performed via
the I2C interface.
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.
Page 23
10. USB connection
Figure 9-1: Connecting
USB cable to Micro USB
connector
implement USB communication functionality to your mikromedia board. Connection with
target USB host is done over micro USB connector which is positioned next to the batter y connector.
PIC18F67K40 microcontroller has an integrated USB module, which enables you to
Page 24
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).
You have now completed the journey through each and every feature of mikromedia for PIC18FK 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 PIC® compiler that suits you best on our site:
https://shop.mikroe.com/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 TF T 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 our site:
https://shop.mikroe.com/software-tools
Page 33
Notes:
Page 34
DISCLAIMER
All the products owned by MikroElektronika are protected by copyright law and international copyright treaty. Therefore, this manual is to be treated as any
other copyright material. No part of this manual, including product and software described herein, may be reproduced, stored in a retrieval system, translated or
transmitted in any form or by any means, without the prior written permission of MikroElektronika. The manual PDF edition can be printed for private or local use,
but not for distribution. Any modification of this manual is prohibited.
MikroElektronika provides this manual ‘as is’ without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties or
conditions of merchantability or fitness for a particular purpose.
MikroElektronika shall assume no responsibility or liability for any errors, omissions and inaccuracies that may appear in this manual. In no event shall
MikroElektronika, its directors, officers, employees or distributors be liable for any indirect, specific, incidental or consequential damages (including damages
for loss of business profits and business information, business interruption or any other pecuniary loss) arising out of the use of this manual or product, even if
MikroElektronika has been advised of the possibility of such damages. MikroElektronika reserves the right to change information contained in this manual at any
time without prior notice, if necessary.
HIGH RISK ACTIVITIES
The products of MikroElektronika are not fault – tolerant nor designed, manufactured or intended for use or resale as on – line control equipment in
hazardous environments requiring fail – safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems,
air traffic control, direct life support machines or weapons systems in which the failure of Software could lead directly to death, personal injury or severe
physical or environmental damage (‘High Risk Activities’). MikroElektronika and its suppliers specifically disclaim any expressed or implied warranty of
fitness for High Risk Activities.
TRADEMARKS
The MikroElektronika name and logo, mikroC, mikroBasic, mikroPascal, Visual TFT, Visual GLCD, mikroProg, Ready, MINI, mikroBUS™, EasyPIC, EasyAVR, Easy8051, click
boards™ and mikromedia are trademarks of MikroElektronika. All other trademarks mentioned herein are property of their respective companies.
All other product and corporate names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies, and are only
used for identification or explanation and to the owners’ benefit, with no intent to infringe.