Specifications

Table Of Contents
II-34 EPSON S1C62740 TECHNICAL SOFTWARE
CHAPTER 6: PERIPHERAL CIRCUITS (LCD Driver)
Displaying 7-segment
The LCD display routine using the assignment of Figure 6.6.2 can
be programmed as follows.
Label Mnemonic/operand Comment
;*
;* LCD DRIVER
;*
;* SEVEN SEGMENT CHARACTER GENERATOR
;
ORG 000H
RETD 3FH ;0 IS DISPLAYED
RETD 06H ;1 IS DISPLAYED
RETD 5BH ;2 IS DISPLAYED
RETD 4FH ;3 IS DISPLAYED
RETD 66H ;4 IS DISPLAYED
RETD 6DH ;5 IS DISPLAYED
RETD 7DH ;6 IS DISPLAYED
RETD 07H ;7 IS DISPLAYED
RETD 7FH ;8 IS DISPLAYED
RETD 6FH ;9 IS DISPLAYED
;
SEVENS:
LD B,0 ;PREPARE B AS 0 FOR JUMP
LD X,090H ;SET LCD DISPLAY MEMORY ADDRESS
JPBA ;JUMP TO TABLE
;
When the above routine is called (by the CALL or CALZ instruction)
with any number from "0" to "9" set in the A register for the assign-
ment of Figure 6.6.3, seven segments are displayed according to
the contents of the A register.
Fig. 6.6.3
Data set in A register and
display patterns
The RETD instruction can be used to write data to the display
memory only if it is addressed using the X register. (Addressing
using the Y register is invalid.)
Note that the stack pointer must be set to a proper value before the
CALL (CALZ) instruction is executed.
0
1
DisplayA resister
2
3
DisplayA resister
4
5
DisplayA resister
6
7
DisplayA resister
8
9
DisplayA resister