NAR-5620 Series
User
’
s
Manual
42
Functions/commands
Decimal/Hex
Comment
1.
Start Of HEX
40/28
Only for 02A
2.
End Of HEX
55/37
Only for 02A
3.
Clear screen
1/01
4.
Home cursor
2/02
5.
Read key
6/06
See note 1
6.
Blank display (retaining data)
8/08
7.
Hide cursor & display blanked characters
12/0C
8.
Turn on (blinking block cursor)
13/0D
9.
Show underline cursor
14/0E
10.
Move cursor 1 character left
16/10
11.
Move cursor 1 character right
20/14
12.
Scroll 1 character left
24/18
13.
Scroll 1 character right
28/1C
14.
Set display address (position the cursor) location
128 ( Location
See note 2
15.
Set character-generator address
64 (Hex 040)+ address
See note 3
Note 1:
Upon r
ecei
vi
ng t
he “
r
ead key”
command f
r
om host
comput
er
,
t
he LCD/
keypad modul
e wi
l
l
check t
he
status of every key and reply with status command accordingly. The replied message from LCD/key-pad
module consists of a header and a status byte. The header byte is 253 (Hex0FD). The high nibble (with the
most
si
gni
f
i
cant
bi
t
)
of
t
he
st
at
us
byt
e
i
s
al
ways
“
4”
and
t
he
l
ow
ni
bbl
e
(
wi
t
h
t
he
l
east
si
gni
f
i
cant
bi
t
)
of
t
he
status byte is used to indicate key pressing
st
at
us
of
t
he
keypad
modul
e.
Thi
s
ni
bbl
e
wi
l
l
be
“
F”
(
of
f
our
1s)
,
if n
o key pr
essed whi
l
e t
he “
r
ead key”
r
ecei
ved.
“
0”
wi
l
l
be used t
o i
ndi
cat
e key pr
essi
ng st
at
us of
corresponding key. There are four keys in this module
–
upper arrow, down arrow, enter (ENT), and escape
(ESC). The relationship between the function key, corresponding status bit and status byte is shown as the
table below.
Function key
Corresponding status bit
Status byte
Escape
The fourth bit of lower nibble (the least significant bit) (1110)
B7 (H)
Up arrow
The third bit of lower nibble (1101)
BE (H)
Enter
The second bit of lower nibble (1011)
BB (H)
Down arrow
The first bit of lower nibble (0111)
BD (H)
More than one key can be pressed at the same time so that there may be more tha
n
one
“
0”
s
i
n
t
he
l
ow
ni
bbl
e
of
st
at
us
byt
e.
For
exampl
e,
i
f
Up
and
Down
ar
r
ow
keys
ar
e
pr
essed
at
t
he
same
t
i
me
whi
l
e
“
r
ead
key”
command
r
ecei
ved,
t
he
r
epl
i
ed
st
at
us
wi
l
l
be
“
Hex045”
.
Note 2: This command can be used to place the cursor at any location. The corresponding address for each
character on the screen is as follows:
For 16×2 Display Address
Character
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
Location
(Address)
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
The addresses of characters at the same row are continuous, so moving cursor commands can be
applied to shift the cursor position back and forth. However, the addresses of characters between upper
and lower row are discontinuous. To change cursor position between upper row and lower row, this
command will be applied.
Note 3: This command can be used to create customized icon. The starting address is 64 and every character
will take 8 bytes to create a 5(W) x 7(H) resolution picture, as shown below: