![](http://datasheet.mmic.net.cn/380000/EDE702_datasheet_16755629/EDE702_6.png)
Copyright
1998 E-Lab Digital Engineering, Inc. All Rights Reserved.
Page 6
Binary Value Sent
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 X
0 0 0 0 0 1 I/D S
Action Taken
Clear display and return cursor to home position.
Home Cursor.
Sets cursor move direction & shifting. I/D= 1 for increment,S= 1 for
shift.
Sets display on (D), cursor on (C), blink on (B). 1= on, 0= off.
Moves cursor and shifts display without affecting DDRAM.
S/L= 1: display shift; 0= cursor movement. R/L= 1, shift right; 0= left.
Sets data length (DL), number of lines (N), and character font (F).
DL= 1:8 bit; 0= 4 bit. N= 1:2 lines;0= 1 line. F= 1:5x10;0= 5x7 dots.
Set CGRAM Address. Character data is sent after receiving this setting.
Set DDRAM Address. Data display address is set using this command.
(Line one starts at $00, line two starts at $40 (Therefore the command
$C0 would move the cursor to the start of the second row).
Outputs a 'LOW' (GND) on the Digital Output pin.
Outputs a 'HIGH (+ 5V) on the Digital Output pin.
0 0 0 0 1 D C B
0 0 0 1 S/C R/L X X
0 0 1 DL N F X X
0 1 X X X X X X
1 X X X X X X X
1 1 1 1 1 1 0 0
1 1 1 1 1 1 0 1
Table Two: $FE Direct Control Codes
As an illustration of these direct control codes, the following code, written in QBASIC for clarity,
will print two lines of text on the LCD and then scroll the entire display to the left 40 positions.
REM Open communication channel to COM1 at 9600 Baud
OPEN "com1:9600,n,8,1,cd0,cs0,ds0,op0,rs" FOR OUTPUT AS #1
REM Clear Display
GOSUB 999
OUT &H3F8, &HFE
GOSUB 999
OUT &H3F8, &H1
REM Pause for LCD screen clear command to complete on LCD module
FOR delay=1 to 5000: NEXT delay
GOSUB 999
PRINT #1, "Line One Text.";
REM Move to first location on row two
GOSUB 999
OUT &H3F8, &HFE
GOSUB 999
OUT &H3F8, &HC0
GOSUB 999
PRINT #1, "Line Two Text.";
REM Shift Entire Display Left
FOR shift = 1 TO 40
GOSUB 999
OUT &H3F8, &HFE
GOSUB 999
OUT &H3F8, &H18
REM Slow down shifting...
FOR delay=1 to 50000: NEXT delay
NEXT shift
END
REM Hold until transmit buffer is empty
999 IF (INP(&H3FD) AND &H40) = 0 THEN GOTO 999
RETURN
As illustrated in the bottom two rows of Table Two, the EDE702 contains a serial-controlled digital
output pin. This pin's voltage level can be changed by sending the appropriate control characters to
the EDE702. For instance, to make this pin high, send $FE (to enter into Control Mode) and then
send $FD. To set it low, send $FE followed by $FC. Sending control signals to the Digital Output
pin will not affect the LCD screen. Upon powerup, the Digital Output pin is set low by the
EDE702.