mikroElektronika SmartGLCD 240x128 User manual

240x128
SmartGLCD

Page 2
I want to express my thanks to you for being interested in our products and for having
condence 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.
TO OUR VALUED CUSTOMERS
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.

What is the SmartGLCD 240x128? 4
Package Contains 5
1. Key Features 6
System Specication 7
2. Power supply 8
3. PIC18F87K22 microcontroller 10
Key microcontroller features 10
4. Programming the microcontroller 11
5. Programming with bootloader 12
mikroBootloader software 12
Identifying device COM port 13
step 1 – Choosing COM port 13
step 2 - Establishing Connection 14
step 3 - Browsing for .HEX le 14
step 4 – Selecting .hex le 15
step 5 – Uploading .hex le 15
step 6 – Progress bar 16
step 7 - Finishing upload 16
Tips and Tricks: Speed-up UART data transfer 17
6. Programming with mikroProg™programmer 18
7. mikroProg Suite™for PIC®Software 20
8. microSD Card Slot 22
9. Touch Screen 24
10. RGB backlight 26
11. Contrast potentiometer 27
12. USB UART 28
13. Buzzer 30
14. Pinout 32
15. Dimensions 33
What’s next? 34
Page 3
Table of Contents

Page 4
The SmartGLCD 240x128 is a compact smart
display, with many on-board peripherals. It’s
designed to become a control interface of your
device. Main part of the board is a large 240x128
pixel graphical LCD with a 4-wire resistive touch
screen. It features RGB backlight, which can
greatly improve user experience, but can also
be used as a signaling feature. The heart of the
board is PIC18F87K22, an 8-bit microcontroller
delivering 12MIPS of processing power. Other
modules like USB UART, piezo buzzer, microSD
slot and connection pads can be found on board
as well. The board is preprogrammed with
UART bootloader. We have also provided a nice
example which will give you a great out-of-the-
box experience.
What is the SmartGLCD 240x128?

SmartGLCD 240x128 - pinout
SPI Lines
Interrupt Lines
Analog Lines
I2C Lines
UART lines
INT
I2C/SPI
PWM Analog I/O mikroProg
Ground
I2C/SPI
TX UART
Digital I/O
AN2
AN3
Digital I/O
Digital I/O
Digital
I/O
Digital I/O
AN4
SCK1/SCL1
SDI1/SDA1
SDO1
SDO2
SDI2/SDA2
SCK2/SCL2
RX
5V power supply
Ground Ground
3.3V power supply output
5V power
supply
RA2
RA3
RA4
RA5
RB0
RB1
RB2
RB3
RB4
RC3
RC4
RC5
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
RE0
RE1
RE2
RE3
RE4
RE5
RE6
RE7
NC
RF1
RF2
RF3
RF4
RF5
RF6
RF7
GND
RG1
RST
RG2
PGD
GND
PGC
5V
5V
SmartGLCD240x128 Pinout
ver.1.51
0 100000 024447
Page 5Page 4
01 02
04 05
03
06
Damage resistant
protective box
SmartGLCD 240x128
development board
SmartGLCD 240x128
user’s guide
SmartGLCD 240x128
schematic and pinout
DVD with documentation
and examples
USB cable
240x128
SmartGLCD
SCHEMATICS
We present you with a complete color schematics for SmartGLCD 240x128
development board. We want you to know what your board is consisted of and
how it actually works.
240x128
SmartGLCD
Package Contains
19122011
www.mikroe.com
Copyright ©2011 Mikroelektronika.
All rights reserved. Mikroelektronika,Mik roelektronika logo and other
Mikroelektronika trademarks are the property of Mikroelektronika.
All other tradmarks are the property of their respective owners.
Unauthorised copying, hiring, renting, public performance
and broadcasting of this DVD prohibited.

Page 6
01
02 03
01
02
03
04
05
06
07
08
09
10
11
12
GLCD 240x128 display
RESET button
Power supply pads
I/O pads
Pads for mikroProg programmer
USB connector
Touch panel connector
PIC18F87K22 microcontroler
Contrast potentiometer
microSD card slot
USB UART module
Buzzer
1. Key Features

Page 7
power supply
Via USB cable (5V DC)
weight
~210g (0.46 lbs)
board dimensions
140x90cm (5.51x3.24’’)
power consumption
~350mA in idle state
(backlight is ON)
06
07
04 0512
System Specication
11080910

Page 8
The SmartGLCD board can be powered in two dierent ways: via USB connector (CN1) using MINI-B USB cable provided with the board
(Figure 2-1), or via side headers (CN2 or CN4) using external 5V power supply (Figure 2-2 and Figure 2-3).
When the board is powered up the GLCD display will be automatically turned on. The USB connection can provide up to 500mA of current
which is more than enough for the operation of all on-board modules and the microcontroller as well.
2. Power supply
Figure 2-1:
connecting USB power supply
through CN1 connector
Figure 2-2:
connecting external 5V power
supply through CN2 connector
Figure 2-3:
connecting external 5V power
supply through CN4 connector

Page 9
Figure 2-4: Power supply schematic
FB1
FERRITE
BEAD
VCC
VCC-3.3VCC-MMC
VIN
VOUT
REG1
MC33269DT-3.3
1
3
2
E1E2 E3
10uF10uF 47uF
C10
C11
100nF100nF
CN1
USB MINI-B
VCC
VCC
VCC
VCC-3.3
CN2
CN4

Page 10
3. PIC18F87K22 microcontroller
The SmartGLCD development tool comes with the PIC18F87K22
microcontroller. This 8-bit microcontroller is rich with on-chip
peripherals and features 128KB of Flash and 4KB of RAM. It can
easily handle demanding graphical applications.
Key microcontroller features
- Up to 12 MIPS Operation;
- 8-bit architecture;
- 128KB of Flash memory;
- 3,862 bytes of RAM;
- 1024 bytes of EEPROM;
- 80 pin TQFP;
- 24 ch, 12-bit ADC;
- UART, SPI, I2C; etc.
Data/Memory Bus
Data Bus
PIC18F
16 MIPS 8-bit Core
- nanoWatt
- Up to 64MHz
31 Level
Stack
Program
Counter
Instruction Data
I/O Timers Comparators ADC
12-Bit USART CCPMSSP
Flash
(Up to 128KB)
RAM
(Up to 3.9KB)
Data
Address
Address
Decoder
SPI
I2C

Page 11
01
02
Using USB UART mikroBootloader
Using external mikroProg™for PIC, dsPIC, PIC32 programmer
Figure 4-1:
PIC18F87K22
microcontroller
The microcontroller can be programmed in two ways:
4. Programming the microcontroller

Page 12
5. Programming with bootloader
Microcontroller is preprogrammed with USB UART Bootloader,
which can be used to upload new device rmware. To trans-
fer rmware .HEX le from a PC to MCU you need to use mikro-
Bootloader USB UART application, which can be downloaded from:
Upon download, unzip it to desired location and start the
mikroBootloader application:
http://www.mikroe.com/smartglcd/
note
Figure 5-1: mikroBootloader window
mikroBootloader software
01 When you start mikroBootloader software a window
should appear, as shown in the image above.
Before starting mikroBootloader software, connect SmartGLCD
to a PC using a USB cable provided with the package.

Page 13
Identifying device COM port
Figure 5-2: Identifying COM port
step 1 – Choosing COM port
01
02
03
01 Open Device Manager window and expand Ports
(COM & LPT) section to check which COM port is
assigned to SmartGLCD board (in this case it is COM18).
Figure 5-3: Choosing COM port
01
02
03
Click the Change Settings button.
From the drop down list, select appropriate Port (in this
case it is COM18) and Baud rate (115200).
Click OK.

Page 14
01
01
Figure 5-4: Connecting with mikroBootloader Figure 5-5: Browse for HEX
01 01
Press the Reset button on SmartGLCD board and click
Connect within 5s, otherwise the existing microcontroller
program will run. If connected, the button’s caption will be
changed to Disconnect.
Click the Browse for HEX button and from a
pop-up window (Figure 5-6) choose a .HEX le to be
uploaded in MCU memory.
step 2 - Establishing Connection step 3 - Browsing for .HEX le

Page 15
Figure 5-7: Begin uploading
step 4 – Selecting .hex le step 5 – Uploading .hex le
01
02
01
Figure 5-6: Locating and selecting .hex le
01
02
Select .HEX le from the Open dialog window.
Click the Open button.
01 In order to upload .HEX le click the Begin
uploading button.

Page 16
01
step 6 – Progress bar
01
step 7 - Finishing upload
Figure 5-8: Progress bar Figure 5-9: Restarting MCU
01 01
02
Progress bar enables you to monitor .HEX le
uploading.
Click OK button after the uploading process has been
nished.
Press Reset button on SmartGLCD board and wait for 5
seconds. Your program will run automatically.

Page 17
01
02
03
04
Right click on the USB Serial Port (COM18) item and then select Properties.
Select Port Settings tab.
Click the Advanced... button.
Set Latency Timer to 1and click OK.
Tips and Tricks: Speed-up UART data transfer
If .HEX le transfer from your PC to
MCU is too slow, it’s possible to speed
up data transfer by setting latency
time of COM port to 1 ms. This is done
in Device Manager:
02
03
04
01
note

Page 18
6. Programming with mikroProg™programmer
Figure 6-2:
The mikroProg can be also attached on the
front side of the board. In this case, solder
1x5 header to front side pads (CN3).
Figure 6-1:
The mikroProg can be attached on the back
side of the board. Just solder 1x5 header to
back side pads (CN3) before connecting it.
The microcontroller can be programmed with the external mikroProg™ programmer which can be connected to the board via CN3
connector. Before establishing this connection it is necessary to solder 1x5 male header to CN3 connection pads. This can be done in
both ways: on the bottom, or the top side, as shown in Figures 6-1 and 6-2.
If bootloader program is accidently erased you can upload it again through mikroProg programmer.
Program Bootloader18F87K22.hex can be found under Firmware folder (page 12).
note

Page 19
Make sure to use only the front row of mikroProg’s IDC10 connector (side with a knob and
incision) when connecting it to 1x5 header on your SmartGLCD board.
VCC
PIC18F87K22
RH1
RH5
RH4
RF1
ENVREG
AVCC
AGND
RA3
RA2
RA1
RA0
GND
VCC
RA5
RA4
RC1
RC0
RC6
RC7
RJ4
RJ5
RH0
RE2
RE3
RE4
RE5
RE6
RE7
RD0
VCC
GND
RD1
RD2
RD3
RD4
RD5
RD6
RD7
RJ0
RJ1
RH2 RJ2
RJ3
RB0
RB1
RB2
RB3
RB4
RB5
RB6
GND
OSC2
OSC1
VCC
RB7
RC5
RC4
RC3
RC2
RJ7
RJ6
RH3
RE1
RE0
RG0
RG1
RG2
RG3
MCLR
RG4
GND
VDDcore/Vcap
RF7
RF6
RF5
RF4
RF3
RF2
RH7
RH6
VCC
VCC
VCC
D1
BAT43
R22
1K
VCC
C5
100nF
E5
10uF
VCC
PGC
PGD
CN3
mRST#
PGD
PGC
mRST#
Figure 6-3: mikroProg™connection schematic
note

Page 20
7. mikroProg Suite™for PIC®Software
The mikroProg™programmer requires
special programming software called
mikroProg Suite™for PIC®. It can be
used for programming all Microchip®mi-
crocontroller families, including PIC10®,
PIC12®, PIC16®, PIC18®, dsPIC30/33®,
PIC24®and PIC32®. The software has
intuitive interface and SingleClick™
programming technology. Just down-
load the latest version of mikroProg
Suite™and 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 7-1: Main window of mikroProg Suite™for PIC®programming software
Page 20
Table of contents
Other mikroElektronika Monitor manuals
Popular Monitor manuals by other brands

Panasonic
Panasonic TH-42PF30U operating instructions

Fermax
Fermax VEO DUOX quick start guide

Samsung
Samsung S27E332H user manual

Daktronics
Daktronics Galaxy AF-3400 Series DISPLAY MANUAL

Elo TouchSystems
Elo TouchSystems M467 User manual & installation guide

Metos
Metos DELI VRX1400-395 Installation and user manual