Sharp LM161 Series User Manual page 19

Dot-matrix lcd units
Table of Contents

Advertisement

CG RAM Address Set
RS R/W
DB
7
CODE
0
0
0
1
The address counter is loaded with a character
generator RAM address, expressed as a 6-digit
binary number. Following the execution of this in-
struction, subsequent data transactions will be be-
tween the external microprocessor and the
character generator RAM.
DD RAM Address Set
RS R/W
DB
7
0
1
A
CODE
0
The address counter is loaded with a display data
RAM address, expressed as a 7-digit binary num-
ber. Following the execution of this instruction, sub-
sequent data transactions will be between the
external microprocessor and the display data RAM.
For N = 0 (single line display), the binary number,
A
may have a value ranging from 00
DD
N = 1 (dual line display), the binary number, A
may have a value ranging from 00
first line, or 40
to 67
for the second line.
H
H
Busy Flag/Address Counter Read
RS R/W
DB
7
1 BF A
CODE
0
The busy flag (BF) is read out, and indicates
whether or not the LCD unit is still executing the
previous instruction. BF = 1 indicates the busy state
(internal operation), and the next instruction will not
be accepted until BF = 0. This instruction also reads
out the contents of the address counter, expressed
as a 7-digit binary number. The address counter is
used for accessing both the character generator
RAM and the display data RAM. On read-out, the
address counter will contain either a character gen-
erator RAM address or a display data RAM address,
as determined by the most recently executed ad-
dress set instruction.
Display Unit User's Manual
DB
0
A
A
A
A
A
A
DB
0
A
A
A
A
A
A
to 4F
. For
H
H
DD
to 27
for the
H
H
DB
0
A
A
A
A
A
A1
CG RAM/DD RAM Data Write
RS R/W
CODE
1
An 8-bit data word is written into either the char-
acter generator RAM or display data RAM, as de-
termined by the most recently executed address set
instruciton. The data is written into the RAM location
specified by the address counter. After the data is
written into the RAM, the address counter is either
incremented or decremented by one, as determined
by the current entry mode. A display shift may also
take place after the data is written.
CG RAM/DD RAM Data Read
RS R/W
CODE
1
An 8-bit data word is read from either the charac-
ter generator RAM or display data RAM, as deter-
mined by a previously executed address set
instruction. The data is read from the RAM location
specified by the address counter.
,
This instruction must be immediately preceded by
the CG RAM address set instruction, the DD RAM
address set instruction, the cursor shift instruction,
or a previous CG RAM/DD RAM data read instruc-
tion. Any other preceding instruction will cause in-
valid data to be read. The address set instructions
cause the address counter to be loaded with a valid
data read address.
The cursor shift command allows selected DD
RAM data to be read without the necessity of reset-
ting the DD RAM address. Following the cursor shift
instruction, the CG RAM/DD RAM data read instruc-
tion will read data from the DD RAM.
After the execution of each data read instruction,
the address counter is either incremented or decre-
mented by one, as determined by the current entry
mode. It is not necessary to reset the RAM address
before the execution of subsequent data read in-
structions if the same RAM is to be read. The
display is not shifted by the data read instruction.
After the execution of the CG RAM/DD RAM data write
instruction, the address counter is incremented or decre-
mented automatically. However, the contents of the RAM
location specified by the address counter cannot be read
by a subsequent CG RAM/DD RAM data read instruction.
The correct procedure for reading data from the CG RAM
or DD RAM is to execute an address set or cursor shift
instruction. Once a data read instruction has been exe-
cuted, successive data read instructions may be exe-
cuted, with no requirement for intervening instructions.
Dot-Matrix LCD Units
DB
DB
7
0
0
D
D
D
D
D
D
D
D
DB
DB
7
0
1
D
D
D
D
D
D
D
D
NOTE
17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lm162 seriesLm202 seriesLm40 2 series

Table of Contents