user s guide t o smartglcd

20
user's guide to SmartGLCD 240x128 Smart GLCD 240x128 represents development tool and final product specially designed for graphical applications which use PIC microcontroller PIC18F8722 www.ekt 2 .com Electronics Katrangi Trading

Upload: others

Post on 17-Feb-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: user s guide t o SmartGLCD

user's guide to

SmartGLCD 240x128

Smart GLCD 240x128

represents development tool

and final product specially

designed for graphical

applications which use PIC

microcontroller PIC18F8722

w w w . e k t 2 . c o mElectronics Katrangi Trading

Page 2: user s guide t o SmartGLCD

Page 6

08

1011

06

07

09

04 05 power supply

Over a USB cable (5V DC)

weight

~200g (0.11 lbs)

board dimensions

140x90cm (5.51x3.24’’)

power consumption

~350mA in idle state

(backlight is ON)

System Specification

w w w . e k t 2 . c o mElectronics Katrangi Trading

Page 3: user s guide t o SmartGLCD

Page 9

Connect the development system to a PC via a USB cable, Figure 1-1.

The GLCD display will be automatically turned on.

1. Connecting

power supply

Figure 1-1: Powering the development system

w w w . e k t 2 . c o m

Page 4: user s guide t o SmartGLCD

Page 8

The SmartGLCD development tool comes with the PIC18F8722

microcontroller. This 8-bit microcontroller with its integrated modules

and in combination with other on-board modules is ideal for creating

graphical applications..

2. PIC18F8722 Microcontroller

Key microcontroller features - Up to 10 MIPS Operation;

- 8-bit architecture;

- 128KB of Flash memory;

- 3,936 bytes of RAM memory;

- 1024 bytes of EEPROM

- 80 pin TQFP;

- 16 ch, 10-bit ADC;

- UART, SPI, ; etc.

Data/Memory Bus

Data Bus

PIC18F10 MIPS 8-bit Core- nanoWatt- Up to 40MHz31 Level

Stack ProgramCounter

Instruction Data

I/O Timers Comparators ADC10-Bit EUSART CCP MSSP

Flash(Up to 128KB) RAM

(Up to 3.9KB)

DataAddressAddresse

Decode

BOR

w w w . e k t 2 . c o m

Page 5: user s guide t o SmartGLCD

Page 11

3. Programming with bootloader

For programming, microcontroller use bootloader program which

is preinstaled in to MCU memory. To transfer .hex file from a PC

to MCU you need bootloader software (mikroBootloader)

After software is downloaded unzip it to desired location and

start mikroBootloader software.

Figure 3-1: mikroBootloader software

Connect SmartGLCD with a PC before

starting mikroBootloader softwarenote

w w w . e k t 2 . c o m

Page 6: user s guide t o SmartGLCD

Page 10

Identifying device COM port

Figure 3-2: Identifying COM port

step 1 – Choosing COM port

Figure 3-3: Selecting COM port

02

03

04

01 Click on Change Settings button

Select USB COM port (in this case COM5)

Set Baud rate to 115200

Click OK buttonIn Device Manager you can see which COM port is

assigned to mikromedia (in this case COM5)note

01

02

03

04

w w w . e k t 2 . c o m

Page 7: user s guide t o SmartGLCD

Page 13

01 Click on Browse for HEX and from pop-up window (figure 3-6)

select .hex file which will be uploaded to MCU memory

step 2 – Connecting with a PC step 3 – Browse for .hex file

Figure 3-4: Connecting mikromedia with mikroBootloader

01

02

From drop down list Select MCU chose PIC18

Reset SmartGLCD and within 5s click on Connect button

Figure 3-5: Browsing for .hex file

02

01

01

w w w . e k t 2 . c o m

Page 8: user s guide t o SmartGLCD

Page 12

Figure 3-6: Selecting .hex file

Figure 3-7: Begin uploading

step 4 – Select .hex file

01 Click on Begin uploading button to start .hex file transfer from

a PC to microcontroler

01 Select desired .hex file

Folder list

Click on Open button03

02

step 5 – Uploading .hex file

01

03

02

01

w w w . e k t 2 . c o m

Page 9: user s guide t o SmartGLCD

step 7 – Reset MCU

Figure 3-9: Uploading is finished

01 Click on OK button after uploading is finished. Reset MCU and

you can see product of your work

01

Figure 3-8: Bootloading progress bar

step 6 – Progress bar

01 Via progress bar you can monitor .hex file uploading process

01

w w w . e k t 2 . c o m

Page 10: user s guide t o SmartGLCD

Page 14

01

02

03

04

Right click on USB Serial Port (COM5) and click on Properties

In USB Serial Port (COM5) Properties select Port Settings tab

Click on Advanced... button

Set latency Timer to 1 (or chose another value) and click on OK button

Tips and Tricks: Speed-up UART data transfer

If .hex file transfer from your PC to MCU

is to slow you can try to speed-up data

transfer by seting latency time of COM

port to 1. To change latency time go to

Device manager:

02

03

04

note

01

w w w . e k t 2 . c o m

Page 11: user s guide t o SmartGLCD

Page 17

The microcontroller can be programmed with external programmer mikroProg.

The external programmer is connected to the development system via marked

pads CN3, Figure 4-1.

In order to connect the external programmer to the development system, it is

necessary to provide a 1x5 header that should be soldered to pads CN3.

If bootloader program is accidently erased you can upload it again via mikroProg

programmer. Program Bootloader18F8722.hex can be found under Firmware

folder (page 10).

4. Programing with

external programmer

Figure 4-1: Connecting external programmer

w w w . e k t 2 . c o m

Page 12: user s guide t o SmartGLCD

Page 16

mikroProg programmer can be also attached on the front side of

the SmartGLCD. Just solder 1x5 header to pads CN3. This is ideal

placment if you prefer using mikroProg

instead of bootloader.

Figure 4-2: Connecting external programmer (GLCD side)

IDC10

connector

VCC MCU-VCC

MCU-PGD

MCU-PGC

MCU-MCLR

PGD-RB7

MCLR

PGC-RB6Always use side with a knob of

IDC connector for connecting

with 1x5 header.

w w w . e k t 2 . c o m

Page 13: user s guide t o SmartGLCD

Page 19

The development system features

a Graphical LCD 240x128 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 way of entering and displaying

data depends on the program loaded into

the microcontroller.

Resistive touch panel is suitable for

usage with a plastic pen which have

rounded tip. Finger press is always available

but bare in mind that you use touch

panel and there’s no need for too

much pressing force.

5. Touch Screen

Figure 5-1: Touch Screen

w w w . e k t 2 . c o m

Page 14: user s guide t o SmartGLCD

Page 18

T OU

CH

PA

NEL

VCC

PIC18F8722

RH

1R

H5

RH

4R

F1R

F0AV

CC

AGN

DR

A3R

A2R

A1R

A0G

ND

VCC

RA5

RA4

RC

1R

C0

RC

6R

C7

RJ4

RJ5

RH

0R

E2R

E3R

E4R

E5R

E6R

E7R

D0

VCC

GN

DR

D1

RD

2R

D3

RD

4R

D5

RD

6R

D7

RJ0

RJ1

RH2 RJ2RJ3RB0RB1RB2RB3RB4RB5RB6GND

OSC2OSC1

VCCRB7RC5RC4RC3RC2RJ7RJ6

RH3RE1RE0RG0RG1RG2RG3MCLRRG4GNDVCCRF7RF6RF5RF4RF3RF2RH7RH6

VCC

VCC

VCC

VCC

GLCD-D2GLCD-D3

LED-B

DRIVEA

DRIVEBmRST#

GLCD-D7GLCD-D6

GLC

D-D

5G

LCD

-D4

LEFT

BOTT

OM

LED

-GM

MC

-CS#

UAR

T-R

XU

ART-

TXG

LCD

-RES

#G

LCD

-MD

GLCD-FS

LED-RRC3-SCK

RC4-MISORC5-MOSI

PGD

PGCMMC-CD#

GLCD-CE#GLCD-WR#

GLC

D-R

D#

GLC

D-C

D

RD

6-SC

KR

D5-

MIS

OSP

I-MO

SI

GLC

D-D

0G

LCD

-D1

VCC1K

1K

R34

R23

GLCD-FS

GLCD-MD

D1BAT43

R221K

VCC

TOUCH PANELCONTROLLER

Q6BC556

Q4BC546

VCC

VCC

VCC

VCC

Q8BC556

QBC546

5

R1K

21

R1K

15

R1K

7

R1K

14

R1K

13

RK

17100

R1K

18

R1K

19R

K20

100

C6100nF

C9100nF

R1K

26

QBC546

7

LEFT

TOP

RIGHT

BOTTOM

DRIVEB

DRIVEA

CN6

C5100nF

VOG

LCD

-CD

GLC

D-R

D#

GLC

D-W

R#

GLC

D-D

0G

LCD

-D1

GLC

D-D

2G

LCD

-D3

GLC

D-D

4G

LCD

-D5

GLC

D-D

6G

LCD

-D7

GLC

D-C

E#G

LCD

-RES

#Ve

eG

LCD

-MD

GLC

D-F

S

GLCDCONTROLLER

RA6963

Figure 5-2-: Touch screen connection schematic

w w w . e k t 2 . c o mElectronics Katrangi Trading

Page 15: user s guide t o SmartGLCD

Page 21

There is a

built-in microSD

card slot for microSD

cards provided on the

development system. It

enables the system to additionally

expand available memory space. The

Serial Peripheral Interface (SPI) is used for

communication between the microcontroller and

microSD card.

6. microSD Card Slot

Figure 6-2: Inserting microSD card

Figure 6-1: microSD card inserted in SmartGLCD

w w w . e k t 2 . c o m

Page 16: user s guide t o SmartGLCD

Page 20

Figure 6-3: microSD card slot connecting schematic

VCC

PIC18F8722

RH

1R

H5

RH

4R

F1R

F0AV

CC

AGN

DR

A3R

A2R

A1R

A0G

ND

VCC

RA5

RA4

RC

1R

C0

RC

6R

C7

RJ4

RJ5

RH

0R

E2R

E3R

E4R

E5R

E6R

E7R

D0

VCC

GN

DR

D1

RD

2R

D3

RD

4R

D5

RD

6R

D7

RJ0

RJ1

RH2 RJ2RJ3RB0RB1RB2RB3RB4RB5RB6GND

OSC2OSC1

VCCRB7RC5RC4RC3RC2RJ7RJ6

RH3RE1RE0RG0RG1RG2RG3MCLRRG4GNDVCCRF7RF6RF5RF4RF3RF2RH7RH6

VCC

VCC

VCC

VCC

GLCD-D2GLCD-D3

LED-B

DRIVEA

DRIVEBmRST#

GLCD-D7GLCD-D6

GLC

D-D

5G

LCD

-D4

LEFT

BOTT

OM

LED

-GM

MC

-CS#

UAR

T-R

XU

ART-

TXG

LCD

-RES

#G

LCD

-MD

GLCD-FS

LED-RRC3-SCK

RC4-MISORC5-MOSI

PGD

PGCMMC-CD#

GLCD-CE#GLCD-WR#

GLC

D-R

D#

GLC

D-C

D

RD

6-SC

KR

D5-

MIS

OSP

I-MO

SI

GLC

D-D

0G

LCD

-D1

VCC1K

1K

R34

R23

GLCD-FS

GLCD-MD

D1BAT43

R221K

VCC

C5100nF

MM

C-M

ISO

-3.3

MM

C-M

ISO

-3.3

R81K

A

VCCB

B

DIR

VCCA

GND

U2

74LVC1T45

VCC

VCC

VCC-3.3

C13 C14

100nF 100nFRC4-MISO

R292K2

R282K2

R272K2

R323K3

R331K

R313K3

R303K3

VCC-MMC

MM

C-C

S#

MM

C-C

D#

RC

5-MO

SI

RC

3-SCK

CN5microSD CARD

CDCMDVCC

CLKGNDDAT0

G

VCC

C100nF

12

FB1

FERRITEBEAD

VCCVCC-3.3VCC-MMC VINVOUT

REG1

MC33269DT-3.31

32

E1E2 E3

10uF10uF 47uF

C10C11

100nF100nF

w w w . e k t 2 . c o mElectronics Katrangi Trading

Page 17: user s guide t o SmartGLCD

Page 23

7. USB UART

Development system can communicate with

USB devices via USB UART module. This

module comes in form of FT232RL chip which

is interface between serial UART on MCU and

USB device.

Figure 7-1: Inserting the USB cable

Figure 7-2: mikromedia connected with PC

via USB cable

w w w . e k t 2 . c o m

Page 18: user s guide t o SmartGLCD

Page 22

VCC

PIC18F8722R

H1

RH

5R

H4

RF1

RF0

A VC

CAG

ND

RA3

RA2

RA1

RA0

GN

DVC

CR

A5R

A4R

C1

RC

0R

C6

RC

7R

J4R

J5

RH

0R

E2R

E3R

E4R

E5R

E6R

E7R

D0

VCC

GN

DR

D1

RD

2R

D3

RD

4R

D5

RD

6R

D7

RJ0

RJ1

RH2 RJ2RJ3RB0RB1RB2RB3RB4RB5RB6GND

OSC2OSC1

VCCRB7RC5RC4RC3RC2RJ7RJ6

RH3RE1RE0RG0RG1RG2RG3MCLRRG4GNDVCCRF7RF6RF5RF4RF3RF2RH7RH6

VCC

VCC

VCC

VCC

GLCD-D2GLCD-D3

LED-B

DRIVEA

DRIVEBmRST#

GLCD-D7GLCD-D6

GLC

D-D

5G

LCD

-D4

LEFT

BOTT

OM

LED

-GM

MC

-CS#

UAR

T-R

XU

ART-

TXG

LCD

-RES

#G

LCD

-MD

GLCD-FS

LED-RRC3-SCK

RC4-MISORC5-MOSI

PGD

PGCMMC-CD#

GLCD-CE#GLCD-WR#

GLC

D-R

D#

GLC

D-C

D

RD

6-SC

KR

D5-

MIS

OSP

I-MO

SI

GLC

D-D

0G

LCD

-D1

VCC1K

1K

R34

R23

GLCD-FS

GLCD-MD

D1BAT43

R221K

VCC

C5100nF

UART-TXDTR#

UART-RX

OSCIDTR#

OSCOTXD

TEST

VCC

RTS#

DSR#

AGND

RESET#

VCCIO

DCD#

NC

GND

RXD

CTS#

CBUS1

USBDM

GND

CBUS2

GND

USBDP

NC

CBUS3

CBUS0

3V3OUT

RI#

CBUS4

FT232RL

U12VCC

C15

100nF

VCC

C16

100nF

C17100nF

CN1

USBDMUSBDP

USB MINI-B

VCC

E4

10uF

VCC-3.3

VCC

VCC

R94K7

R1010K

Figure 7-3: USB UART connecting schematic

w w w . e k t 2 . c o mElectronics Katrangi Trading

Page 19: user s guide t o SmartGLCD

Page 25

8. Pinout

SPI Lines

Interrupt Lines

Analog Lines

I2C Lines

UART lines

INT

I2C/SPI

PWM Analog I/O mikroProg

Gro

und

I2C/SPI

TXU

ART

Dig

ital

I/O

AN

2A

N3

Dig

ital

I/O

Dig

ital

I/O

Digital I/O

Dig

ital

I/O

AN

4

SCK

1/S

CL1

SDI1

/SD

A1

SDO

1

SDO

2SD

I2/S

DA

2SC

K2

/SCL

2

RX

5V power supplyGroundGround3.3V power supply output

5V

pow

er

supp

ly

RA

2R

A3

RA

4R

A5

RB

0R

B1

RB

2R

B3

RB

4R

C3R

C4R

C5R

D0

RD

1R

D2

RD

3R

D4

RD

5R

D6

RD

7R

E0R

E1R

E2R

E3R

E4R

E5R

E6R

E7R

F0R

F1R

F2R

F3R

F4R

F5R

F6R

F7

GN

D

RG

1

RST

RG

2

PGD

GN

D

PGC

5V 5V

w w w . e k t 2 . c o m

Page 20: user s guide t o SmartGLCD

Page 24

140mm (5.51")134mm (5.28")

90m

m (3

.54"

)6.

24m

m(0

.25"

)

74m

m (2

.91"

)

67,7

2mm

(2.6

7")

4mm(0.157")

83m

m (3

.27"

)

2.54mm (0.10")

1.6mm(0.06")

Tolerance +/- 0.3mm

14.3mm(0.52")

9.7mm(0.44")

30mm (1.18")15.61mm (0.61")

128mm (5.04") 7mm (0.28")

12.57mm (0.50")

3.62

mm

(0.1

4")

w w w . e k t 2 . c o m