NAR-7070 User’s Manual
69
clear the screen, send the command prefix (254) followed by the LCD clear-screen code (1). The valid
data range is shown as the following table:
Valid data range
Displayed characters
0-7 Customized
icon
0-7
48-57 (30-39 Hex)
0-9
65-90 (41-5A Hex)
A-Z
97-122 (61-7A Hex)
a-z
To get the key pressing status, a “read key” command can be issued to this module, which will
check the key-pressing status and reply accordingly. The following are the commands and
corresponding Decimal/Hex values:
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 receiving the “read key” command from host computer, the LCD/keypad module will check the
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 significant bit) of the status byte is always “4” and the low nibble (with the least significant bit) of the
status byte is used to indicate key pressing status of the keypad module. This nibble will be “F” (of four 1s),
if no key pressed while the “read key” received. “0” will be used to indicate key pressing status 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)
4E (H)
Up arrow
The third bit of lower nibble (1101)
4D (H)
Enter
The second bit of lower nibble (1011)
4B (H)
Down arrow
The first bit of lower nibble (0111)
47 (H)
More than one key can be pressed at the same time so that there may be more than one “0”s in the low
nibble of status byte. For example, if Up and Down arrow keys are pressed at the same time while “read
key” command received, the replied status will 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: