-Support UART

15
RSI24064****-01 Application Notes RAYLID ELECTRONICS Co.,LTD 1 / 15 www.raylid.com RAYLID LCD Module RSI24064****-01 Application Notes -Support UART Ver:1.0 2016-7-27 Subject to change without notice. RAYLID ELECTRONICS Co.,LTD http://www.raylid.com E-mail:[email protected] TEL:86-755-28169430 FAX:86-755-29173552

Transcript of -Support UART

Page 1: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 1 / 15 www.raylid.com

RAYLID

LCD Module RSI24064****-01

Application Notes

-Support UART

Ver:1.0 2016-7-27

Subject to change without notice.

RAYLID ELECTRONICS Co.,LTD

http://www.raylid.com

E-mail:[email protected]

TEL:86-755-28169430

FAX:86-755-29173552

Page 2: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 2 / 15 www.raylid.com

RAYLIDUpdate History

Version Date Description

1.0

2016-07-27

Preliminary Version

Page 3: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 3 / 15 www.raylid.com

RAYLIDDirectory

1. Features…………………………………………………………………………………………4

2. Structure…………………………………………………………………………………………4

2.1 Mechanical characteristics…………………………………………………………………4

2.2 Mechanical Drawings………………………………………………………………………5

3 Interface Definition………………………………………………………………………………6

4. Maximum Absolute Limit………………………………………………………………………6

4.1 Maximum DC Characteristic…………………………………………………………………6

4.2 Maximum Ambient Temperature………………………………………………………………6

5. Operating Electrical Characteristic……………………………………………………………7

5.1 DC Characteristic………………………………………………………………………………7

5.2 Communicate……………………………………………………………………………………7

6. Key-Scan…………………………………………………………………………………………7

7 Applications………………………………………………………………………………………8

8 API library………………………………………………………………………………………8

8.1 API Functions table……………………………………………………………………………8

8.2 API Functions Description………………………………………………………………………9

9 Product Selection……………………………………………………………………………15

Page 4: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 4 / 15 www.raylid.com

RAYLID1. Features ●240*64 STN Blue/STN YG/STN Grey

●Viewing angle:6:00

●Built-In Simplified/Traditional Chinese,Japanese,Korean and ASCII font ROM.

●Font size:

Half-width:5*7/8*16

Full-width:16*16

●2D graphics (point, line, circle, rectangle) drawing function

●Support 8x8 key-scan

●Backlight:WhiteLED(STN Blue/STN Grey),Yellow-green LED(STN YG)

●Operating Voltage:5.0±0.1V

●Operating temperature:-20~70℃

●Storage temperature:-30~80℃

●Support interface:UART(TTL:5.0V/RS232)

2. Structure

2.1 Mechanical characteristics Parameter Specification Unit

Dimensions 180.0(L)*65.0(W)*14.0(H) mm

Visible area(VA) 132.0*39.0 mm

Active area(AA) 127.16*33.88 mm

Resolution 240*64 dots

Pixel size 0.49*0.49 mm

Pixel spacing 0.04 mm

Weight TBD Grams

Page 5: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 5 / 15 www.raylid.com

RAYLID2.2 Mechanical Drawings

240*64 DO

TS

180.

0(P

CB

)

155.

0(B

EZ

EL

)

65.0(PCB)

54.057.0(BEZEL)

39.0(VA)33.88(AA)

132.

0(V

A)

127.

16(A

A)

14.0

(Max

)1.

6(P

CB

)

1

120 KEY

5C

ON

176.

0

4-3.5

4-2

88.0

UA

RT

(TT

L:5.0V

) OR

RS

232 INT

ER

FA

CE

Operation T

emperature -20

°C T

O 70°C

Rem

ark

Storage T

emperature -30

°C T

O 80°C

LE

D(W

HIT

E)

Backlight S

peciality

Display T

ype ST

N(B

LU

E)/T

RA

NS

MIS

SIV

E/N

EG

AT

IVE

Display R

esolution D

OT

S:240*64V

iewing A

ngle 6:00

Logic V

oltage 5.0V

ST

BL

2WH

ES

-06-NSC

DE

SC

RIPT

ION

:

RS

I2406

4B****-01

Mod

ule Speciality

: Critical dim

ension(...): R

eference dimension

Otherw

ise specified:x.xx±0.2

TH

IRD

AN

GL

E P

RO

JEC

TIO

NS

IGN

PR

OJE

CT

NO

:

<>

: Special characteristic

+: S

afety characteristicT

olerance unless:x.x±0.3

DA

TE

TIT

LE

:

SH

EE

T: O

F U

NIT

:R

EV

: AS

CA

LE

:

DR

AW

N

CH

EC

KE

D

CH

EC

KE

D

11

1:1m

m

12-02-23

DA

TE

MO

DIFY

DE

SC

RIP

TIO

NISS

UE

AF

irst issue

11G

ND

12K

I0

13K

I1

14K

I2

KI3

1520G

ND

KI7

19K

I618

KI5

17K

I416

6K

O3

7K

O4

8K

O5

9K

O6

KO

710 5

KO

2

KO

14

KO

03

GN

D2

VD

D1

CO

N1V

DD

2D

IN

3B

US

Y(N

C)

4D

OU

T

GN

D5

KE

Y

ww

w.raylid.com

Page 6: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 6 / 15 www.raylid.com

RAYLID 3. Interface Definiton

3.1 Contrl and Power Interface Pin No. Symbol I/O function

1 VDD P Power supply(+5.0V)

2 RXD I UART RXD input

3 BUSY O UART busy output,high is busy

4 TXD O UART TXD output

5 GND P Ground

3.2 Key-Scan interface(Supports only key scan models)

Pin No. Symbo I/O function

1 VDD P 5V power output

2 GND P Ground

3 KO0 O

Key scan signal

4 KO1 O

5 KO2 O

6 KO3 O

7 KO4 O

8 KO5 O

9 KO6 O

10 KO7 O

11 GND P Ground

12 KI0 I

Key scan signal

13 KI1 I

14 KI2 I

15 KI3 I

16 KI4 I

17 KI5 I

18 KI6 I

19 KI7 I

20 GND P Ground

4. Maximum Absolute Limit 4.1 Maximum DC Characteristi(Ta=25℃)

Parameter Symbo Min. Max. Unit

Supply Voltage Range VDD -0.3 6.5 V

Input Voltage Range VIN -0.3 VDD+0.3 V

Notes:1. Voltage conditions exceed the limits will damage the product.

2.All supply voltages are referenced to Gnd = 0V.。

4.2 Maximum Ambient Temperature Parameter Symbo Min. Max.

Operating temperature -20 70 ℃

Storage temperature -30 80 ℃

Note: Ambient temperature outside the limits will result in the product not working or damaged.

Page 7: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 7 / 15 www.raylid.com

RAYLID5. Operating Electrical Characteristic 5.1 DC Characteristic(Ta = 25 °C, VDD = 5.0V±0.2V, GND=0V)

Parameter Symbo Min. Typ. Max. Unit

Operating Voltage VDD 4.8 5.0 5.2 V

Input Voltage VIH 0.8*VDD - VDD V

VIL GND - 0.2*VDD V

Ouyput Voltage VOH VDD-0.4 - VDD V

VOL GND - GND+0.4 V

Backlight off IDD1 - 90 - mA

Backlight on IDD2 - 210 - mA

NOTE:RS232 interface signals electrical parameters as the standard RS232 signal.

5.2 Communication(UART) Band rate:9600b/s(Default)

Data bits:8bit

Parity bit:None

Stop bit:1bit

6.Key-Scan

Support 4 * 8 keyboard scanning function can help system developers to implement

keyboard control solution

GNDVDD

KO7KO6KO5KO4KO3KO2KO1KO0

KI0KI1KI2KI3KI4KI5KI6KI7

5.0V Power output

8-1 Keyboard reference design schematics

KI0 KI1 KI2 KI3 KI4 KI5 KI6 KI7

KO0 00H 01H 02H 03H 04H 05H 06H 07H

KO1 10H 11H 12H 13H 14H 15H 16H 17H

KO2 20H 21H 22H 23H 24H 25H 26H 27H

KO3 30H 31H 32H 33H 34H 35H 36H 37H

KO4 40H 41H 42H 43H 44H 45H 46H 47H

KO5 50H 51H 52H 53H 54H 55H 56H 57H

KO6 60H 61H 62H 63H 64H 65H 66H 67H

KO7 70H 71H 72H 73H 74H 75H 76H 77H

Page 8: -Support UART

RA

7.●

8.8.

Type

System

Text

AYLID ELEC

RAY

. Applicati●UART interf

RS232 in

. API libra

.1 API Fun

void reset()

void clear_dis

void display_

void display_

void brightne

void contrast

void cusor_xy

void inversely

void inversely

void font_spa

void print_str

void print_str

void print_str

void print_str

void print_str

void print_str

void print_U3

void print_U3

void print_U3

PC/PLUSB tRS485

CTRONICS C

YLID

ions face products

terface prod

ry (c) nctions tab

Functio

splay()

_on()

_off()

ess(U8 n)

(U8 n)

y(U8 x,U8 y)

y_on()

y_off()

acing(U8 n)

ring_5x7(U8 *ptr)

ring_xy_5x7 (U8

ring_8x16(U8 *pt

ring_xy_8x16 (U8

ring_hf(U8 *ptr)

ring_xy_hf (U8 x,

32_5x7(U32 n)

32_xy _5x7(U8 x

32_8x16(U32 n)

LC RS232 to RS232 5 to RS232

Co.,LTD

8

s, directly wit

ucts, directly

ble ns

)

x,U8 y,U8 *ptr)

tr)

8 x,U8 y,U8 *ptr)

U8 y,U8 *ptr)

,U8 y,U32 n)

P

RXD

TXD

8 / 15

8-2 Keycode ta

th the MCU

y with the PC

Reset

Clear

Displa

Displa

Backli

LCD c

Chara

Invers

Invers

Row a

Displa

Displa

Displa

Displa

Displa

Displa

Long i

Long i

Long i

Power:5.0V

Powe

able

UART (TTL:

C, PLC RS23

display

ay on

ay off

ght brightness a

contrast adjustme

acter display start

se mode on

se mode off

and column spac

ay 5*7 ASCII strin

ay 5*7ASCII strin

ay8*16 ASCII stri

ay 8*16ASCII stri

ay Full-width or h

ay Full-width or h

integer variable t

integer variable t

integer variable t

TXD

RXD

VDD

GNDV

r:5.0V

RSA

www

5.0V) conne

2 connection

Descriptio

djustment

ent

t position

ing

ng at current pos

g at the specified

ng at current pos

ng at the specifie

alf-width string a

alf-width string a

to display at curre

to display at he s

to display at curre

LC

D Interface

D

D

D

D

TXD

RXD

VDD

GND

SI24064***Application N

ww.raylid.

ection

nRS232

on

sition

d position

sition

ed position

at current position

at the specified p

rent position t,fon

specified position

rent position t,fon

LC

D Interface

*-01 Notes

com

n

osition

nt size 5*7

n,font size 5*7

nt size8*16

Page 9: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 9 / 15 www.raylid.com

RAYLIDvoid print_U32_xy _8x16(U8 x,U8 y,U32 n) Long integer variable to display at he specified position,font size 8*16

Graphic

void draw_pixel(U8 x,U8 y) Draw a pixel

void delete_pixel(U8 x,U8 y) Delete a pixel

void draw_line(U8 x1,U8 y1,U8 x2,U8 y2) Draw a line

void delete_line(U8 x1,U8 y1,U8 x2,U8 y2) Delete a line

void draw_rectangle(U8 x1,U8 y1,U8 x2,U8 y2) Draw a non-filled rectangle.

void delete_rectangle(U8 x1,U8 y1,U8 x2,U8 y2) Delete a non-filled rectangle.

void draw_rectangle_fill(U8 x1,U8 y1,U8 x2,U8 y2) Draw a filled rectangle.

void delete_rectangle_fill(U8 x1,U8 y1,U8 x2,U8 y2) Delete a filled rectangle.

void draw_circle(U8 x,U8 y,U8 r) Draw a non-filled circle

void delete_circle(U8 x,U8 y,U8 r) Delete a non-filled circle

void draw_circle_fill(U8 x,U8 y,U8 r) Draw a filled circle

void delete_circle_fill(U8 x,U8 y,U8 r) Delete a filled circle

void inversely_area(U8 x1,U8 y1,U8 x2,U8 y2) Designated area inversely

Key-scan

void key_enable() Key scan enable

void key_disable() Key scan disable

Key code output Output Format:0XAA n d1,d2,d3

NOTE: All API functions call the "void send (U8 d)" So before calling the API function, you first need to initialize the master (MCU or PC) UART, and according to the master MCU to "void send (U8 d)" function body make a statement.

8.2 API Functions Description 8.2.1 void reset() Reset LCD module

8.2.2 void clear_display() Clear display, Return to the starting position 0,0

8.2.3 void display_on() Display on, the power-on default

8.2.4 void display_off() Display off, Turn off LCD and backlight

8.2.5void brightness(U8 n) Backlight brightness adjustment

Parameter

n:0~0xff, Default 0XFF

8.2.6 void contrast(U8 n) LCD contrast adjustment

Parameter

n: If bit7 = 1 means that the contrast increases,otherwise decrease the contrast.

bit[6:0] is increased or decreased specific value

Page 10: -Support UART

RA

8.Ch

Pa

x:0

y:0

8.In

8.In

8.Ro

Pa

bit

bit

8.Di

Pa

*p

Ex

vo

8.Di

Pa

*p

x:0

y:0

Ex

vo

8.Di

Pa

*p

AYLID ELEC

RAY

.2.7 void character disp

arameter

0~239

0~63

.2.8 void iverse mode

.2.9 void iverse mode

In

.2.10 void ow and colum

arameter

t[7:4] is colum

t[3:0] is Row

.2.11 void isplay 5*7 AS

arameter

ptr: ASCII stri

xample

oid print_strin

.2.12 void isplay 5*7AS

arameter

ptr:ASCII strin

0~239

0~63

xample

oid print_strin

.2.13 void isplay 8*16A

arameter

ptr: ASCII stri

CTRONICS C

YLID

cusor_xy(Uplay start pos

nversely_on

nversely_off

nverse mod

font_spacmn spacing

mn spacing

w spacing

print_striSCII string at

ings

ng_5x7(“abcd

print_striSCII string at

ngs

ng_xy_5x7(5

print_striASCII string a

ings

Co.,LTD

U8 x,U8 y)sition

_on()

_off()

de off

cing(U8 n)

ng_5x7(Ut current pos

dABCD”);

ng_xy_5xthe specified

5,5,“abcd123

ng_8x16(Uat current pos

10 / 15

)

)

8 *ptr) sition

x7 (U8 x,U8d position

3”); // Disp

U8 *ptr) sition

8 y,U8 *pt

plays the stri

RSA

ww

Inverse m

r)

ing "abcd123

SI24064***Application N

ww.raylid.

mode on

3" at 5,5

*-01 Notes

d.com

Page 11: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 11 / 15 www.raylid.com

RAYLIDExample

void print_string_8x16(“abcdABCD”); 8.2.14 void print_string_xy_8x16 (U8 x,U8 y,U8 *ptr) Display 8*16 ASCII string at the specified position

Parameter

*ptr:ASCII strings

x:0~239

y:0~63

Example

void print_string_xy_8x16(5,5,“abcd123”); // Displays the string "abcd123" at 5,5

8.2.15 void print_string_hf(U8 *ptr) Display Full-width or half-width string at current position, Automatically identify full-width or

half-width.

Parameter

*ptr: strings

Example

void print_string_hf(“中文 LCD”); //Display “中文 LCD”

8.2.16 void print_string_xy_hf(U8 x,U8 y,U8 *ptr) Display Full-width or half-width string at the specified position, Automatically identify

full-width or half-width.

Parameter

*ptr: strings

x:0~239

y:0~63

Example

void print_string_hf(3,3“中文 LCD”); //Display “中文 LCD”at 3,3 8.2.17 void print_U32_5x7(U32 n) Long integer variable to display at current position t,font size 5*7

Parameter

n: 0~4294967295(Decimal)

Example

void print_U32_5x7(898,3); //display 898

8.2.18 void print_U32_xy_5x7(U8 x,U8 y,U32 n) Long integer variable to display at the specified positiont,font size 5*7

Parameter

x:0~239

y:0~63

n: 0~4294967295(Decimal)

Example

void print_U32_5x7(8,8,898,3); // Display 898 at coordinates 8,8

Page 12: -Support UART

RA

8.Lo

Pa

n:

Ex

vo

8.Lo

Pa

x:0

y:0

n:

Ex

vo

8.Dr

Pa

x:0

y:0

8.De

Pa

x:0

y:0

8.Dr

Pa

x1

y1

x2

y2

Ex

dr

8.De

AYLID ELEC

RAY

.2.19 void ong integer v

arameter

0~42949672

xample

oid print_U32

.2.20 void ong integer v

arameter

0~239

0~63

0~42949672

xample

oid print_U32

.2.21 void raw a pixel

arameter

0~239

0~63

.2.22 void elete a pixel

arameter

0~239

0~63

.2.23 void raw a line

arameter

1:0~239

1:0~63

2:0~239

2:0~63

xample

raw_line(50,1

.2.24 void elete a line

CTRONICS C

YLID

print_U32variable to dis

295(Decimal

2_8x16(898);

print_U32variable to dis

295(Decimal

2_8x16(8,8,8

draw_pix

delete_pi

draw_line

17,170,46);

delete _li

Co.,LTD

2_8x16(U3splay at curr

l)

; //display 8

2_xy_8x16splay at the s

l)

898); // Disp

xel(U8 x,U8

xel(U8 x,U

e(U8 x1,U8

ne(U8 x1,

12 / 15

32 n) rent position

898

6(U8 x,U8 specified pos

play 898 at c

8 y)

U8 y)

8 y1,U8 x2

U8 y1,U8

t,font size 8*

y,U32 n)sitiont,font si

coordinates 8

2,U8 y2)

x2,U8 y2)

RSA

ww

*16

ize 8*16

8,8

SI24064***Application N

ww.raylid.

*-01 Notes

d.com

Page 13: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 13 / 15 www.raylid.com

RAYLIDParameter

x1:0~239

y1:0~63

x2:0~239

y2:0~63

8.2.25 void draw_ rectangle (U8 x1,U8 y1,U8 x2,U8 y2) Draw a non-filled rectangle

Parameter

x1:0~239

y1:0~63

x2:0~239

y2:0~63

8.2.26 void delete _ rectangle(U8 x1,U8 y1,U8 x2,U8 y2) Delete a non-filled rectangle

Parameter

x1:0~239

y1:0~63

x2:0~239

y2:0~63

8.2.27 void draw_ rectangle_fill (U8 x1,U8 y1,U8 x2,U8 y2) Draw a filled rectangle

Parameter

x1:0~239

y1:0~63

x2:0~239

y2:0~63

8.2.28 void delete _ rectangle_fill(U8 x1,U8 y1,U8 x2,U8 y2) Delete a filled rectangle

Parameter

x1:0~239

y1:0~63

x2:0~239

y2:0~63

8.2.29 void draw_circle(U8 x,U8 y,U8 r) Draw a non-filled circle

Parameter

x:0~239

y:0~63

r: Radius, x+r≤239,x-r≥0, y+r≤63,y-r≥0

Page 14: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 14 / 15 www.raylid.com

RAYLID8.2.30 void delete_circle(U8 x,U8 y,U8 r) Delete a non-filled circle

Parameter

x:0~239

y:0~63

r: Radius, x+r≤239,x-r≥0, y+r≤63,y-r≥0

8.2.31 void draw_circle_fill(U8 x,U8 y,U8 r) Draw a filled circle

Parameter

x:0~239

y:0~63

r: Radius, x+r≤239,x-r≥0, y+r≤63,y-r≥0

8.2.32 void delete_circle_fill(U8 x,U8 y,U8 r) Delete a filled circle Parameter

x:0~239

y:0~63

r: Radius, x+r≤239,x-r≥0, y+r≤63,y-r≥0

8.2.33 void inversely_area(U8 x1,U8 y1,U8 x2,U8 y2) Designated area inversely

Parameter

x1:0~239

y1:0~63

x2:0~239

y2:0~63

8.2.34 void key_enable(); Key scan enable, Only support key scanning products

8.2.35 void key_ disable(); Key scan disable, Only support key scanning products

8.2.36 0XAA 0X55 n This instruction module TXD output command, This instruction module TXD output

command, For host computer processing. Only support key scanning products.

Parameter

n: Reference8-2 Keycode table

Page 15: -Support UART

RSI24064****-01 Application Notes

RAYLID ELECTRONICS Co.,LTD 15 / 15 www.raylid.com

RAYLID 9. Product Selection

R:RS232

XXX X

A:ASCII

RSI24064

Series Name

Display ModeY:STN YG

B:STN BlueG:FSTN Grey

Font:

S:Simplified Chinese(GB2312)+ASCIIT:Traditional Chinese(BIG5)+ASCIIH:Korean(HANGUL)+ASCIIJ:Japanese(S-JIS)+ASCIINOTE: If need other fonts, can provide customized services.

K:SupportN:Not support

U:TTL:5.0VSignal Standard:

Key-scan:

Product number

01

Note: If have special needs, hardware and software and fonts can provide customized

services.