Sitronix: Dot Matrix LCD Controller/Driver
Sitronix: Dot Matrix LCD Controller/Driver
Sitronix: Dot Matrix LCD Controller/Driver
Features
Description
The ST7066 dot-matrix liquid crystal display 240 5x8(5x11) dot character fonts and 325 x 11 dot
controller and driver LSI displays alphanumeric, character fonts for a total of 240 different character
Japanese kana characters, and symbols. It can be fonts. The low power supply (2.7V to 5.5V) of the
configured to drive a dot-matrix liquid crystal display ST7066 is suitable for any portable battery-driven
under the control of a 4- or 8-bit microprocessor. product requiring low power dissipation.
Since all the functions such as display RAM,
character generator, and liquid crystal driver, required The ST7066 LCD driver consists of 16 common
for driving a dot-matrix liquid crystal display are signal drivers and 40 segment signal drivers which
internally provided on one chip, a minimal system can can extend display size by cascading segment driver
be interfaced with this controller/driver. ST7065 or ST7063. The maximum display size can
be either 80 characters in 1-line display or 40
The ST7066 has pin function compatibility with the characters in 2-line display. A single ST7066 can
HD44780, KS0066U and SED1278 that allows the display up to one 8-character line or two 8-character
user to easily replace it with an ST7066. The ST7066 lines.
character generator ROM is extended to generate
V1.5 1 2000/8/03
ST7066
Block Diagram
Instruction
Register (IR) COM1 to
RS MPU Display 16-bit Common COM16
Interface data RAM shift Signal
RW (DDRAM) registe Driver
80x8 bits r
E Instruction
Decoder
SEG1 to
40-bit 40-bit Segment SEG40
shift latch Signal
Address registe circuit Driver
Counter r
DB4 to
DB7
Input/
Output
Data
DB0 to Buffer
Register LCD Drive
DB3 (DR) Voltage
Selector
Busy
Flag
Character Character
generator generator Cursor
RAM ROM and
(CGRAM) (CGROM) Blink
64 bits 9,920 bits controller
Parallel/Serial converter
GND and
Attribute Circuit
Vcc
V1 V2 V3 V4 V5
V1.5 2 2000/8/03
ST7066
Pad Arrangement
1 80 64
ST7066
(0,0)
24 41
Subtrate:VDD
V1.5 3 2000/8/03
ST7066
V1.5 4 2000/8/03
ST7066
Pin Functions
Note:
1. Vcc>=V1>=V2>=V3>=V4>=V5 must be maintained
2. Two clock options:
R=91K
(Vcc=5V)
V1.5 5 2000/8/03
ST7066
FUNCTION DESCRIPTION
System Interface
This chip has all two kinds of interface type with MPU : 4-bit bus and 8-bit bus. 4-bit bus or 8-bit bus is selected by DL
bit in the instruction register.
During read or write operation, two 8-bit registers are used. One is data register (DR), the other is instruction
register(IR).
The data register(DR) is used as temporary data storage place for being written into or read from DDRAM/CGRAM,
target RAM is selected by RAM address setting instruction. Each internal operation, reading from or writing into
RAM, is done automatically. So to speak, after MPU reads DR data, the data in the next DDRAM/CGRAM address is
transferred into DR automatically. Also after MPU writes data to DR, the data in DR is transferred into
DDRAM/CGRAM automatically.
The Instruction register(IR) is used only to store instruction code transferred from MPU. MPU cannot use it to read
instruction data.
V1.5 6 2000/8/03
ST7066
Display Data RAM (DDRAM)
Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Its extended capacity is 80 x 8
bits, or 80 characters. The area in display data RAM (DDRAM) that is not used for display can be used as general
data RAM. See Figure 1 for the relationships between DDRAM addresses and positions on the liquid crystal display.
The DDRAM address (ADD ) is set in the address counter (AC) as hexadecimal.
When there are fewer than 80 display characters, the display begins at the head position. For
example, if using only the ST7066, 8 characters are displayed. See Figure 3.
When the display shift operation is performed, the DDRAM address shifts. See Figure 3.
Display
Position 1 2 3 4 5 6 78 79 80
(Digit) 00 01 02 03 04 05 ……………….. 4D 4E 4F
DDRAM Address
Figure 2 1-
1-Line Display
Display
Position 1 2 3 4 5 6 7 8
00 01 02 03 04 05 06 07
DDRAM
Address
For 01 02 03 04 05 06 07 08
Shift Left
For 4F 00 01 02 03 04 05 06
Shift Right
Figure 3 1-
1-Line by 8-
8-Character Display
Display Example
Case 1: When the number of display characters is less than 40 × 2 lines, the two lines are displayed from the head. Note that
the first line end address and the second line start address are not consecutive. For example, when just the ST7066 is
used, 8 characters × 2 lines are displayed. See Figure 5.
V1.5 7 2000/8/03
ST7066
When display shift operation is performed, the DDRAM address shifts. See Figure 5.
Display 1 2 3 4 5 6
38 39 40
Position
00 01 02 03 04 05 ……………….. 25 26 27
DDRAM
Address 40 41 42 43 44 45 ……………….. 65 66 67
(hexadecimal)
Figure 4 2-
2-Line Display
Display
Position 1 2 3 4 5 6 7 8
DDRAM 00 01 02 03 04 05 06 07
Address
40 41 42 43 44 45 46 47
For 01 02 03 04 05 06 07 08
Shift Left
41 42 43 44 45 46 47 48
For
Shift Right 27 00 01 02 03 04 05 06
67 40 41 42 43 44 45 46
Figure 5 2-
2-Line by 8-
8-Character Display Example
Case 2: For a 16-character × 2-line display, the ST7066 can be extended using one 40-output
extension driver. See Figure 6.
When display shift operation is performed, the DDRAM address shifts. See Figure 6.
Display
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Position
DDRAM 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Address
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
For 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10
Shift
Left 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50
For 27 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E
Shift
Right 67 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E
Figure 6 2-
2-Line by 16-
16-Character Display Example
V1.5 8 2000/8/03
ST7066
Character Generator ROM (CGROM)
The character generator ROM generates 5 x 8 dot or 5 x 11 dot character patterns from 8-bit character codes. It can
generate 208 5 x 8 dot character patterns and 32 5 x 11 dot character patterns. User-defined character patterns are
also available by mask-programmed ROM.
Write into DDRAM the character codes at the addresses shown as the left column of Table 4 to show the character
patterns stored in CGRAM.
See Table 5 for the relationship between CGRAM addresses and data and display patterns. Areas that are not used
for display can be used as general data RAM.
V1.5 9 2000/8/03
ST7066
Table 4 Correspondence between Character Codes and Character Patterns (ROM Code: 0A)
V1.5 10 2000/8/03
ST7066
Table 4(Cont.) (ROM Code: 0B)
V1.5 11 2000/8/03
ST7066
Table 4(Cont.) (ROM Code: 0E)
V1.5 12 2000/8/03
ST7066
Character Code CGRAM Character Patterns
(DDRAM Data) Address (CGRAM Data)
b7 b6 b5 b4 b3 b3 b1 b0 b5 b4 b3 b2 b1 b0 b7 b6 b5 b4 b3 b2 b1 b0
0 0 0 0 0 0 1 1 1 1 1
0 0 0 0 0 1 0 0 1 0 0
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 1 1 0 0 1 0 0
0 0 0 0 - 0 0 0 - - -
0 0 0 1 0 0 0 0 1 0 0
0 0 0 1 0 1 0 0 1 0 0
0 0 0 1 1 0 0 0 1 0 0
0 0 0 1 1 1 0 0 0 0 0
0 0 1 0 0 0 1 1 1 1 0
0 0 1 0 0 1 1 0 0 0 1
0 0 1 0 1 0 1 0 0 0 1
0 0 1 0 1 1 1 1 1 1 0
0 0 0 0 - 0 0 0 - - -
0 0 1 1 0 0 1 0 1 0 0
0 0 1 1 0 1 1 0 0 1 0
0 0 1 1 1 0 1 0 0 0 1
0 0 1 1 1 1 0 0 0 0 0
Table 5 Relationship between CGRAM Addresses, Character Codes (DDRAM) and Character patterns (CGRAM Data)
Notes:
1. Character code bits 0 to 2 correspond to CGRAM address bits 3 to 5 (3 bits: 8 types).
2. CGRAM address bits 0 to 2 designate the character pattern line position. The 8th line is the
cursor position and its display is formed by a logical OR with the cursor. Maintain the 8th line data, corresponding
to the cursor display position, at 0 as the cursor display. If the 8th line data is 1, 1 bits will light up the 8th line
regardless of the cursor presence.
3. Character pattern row positions correspond to CGRAM data bits 0 to 4 (bit 4 being at the left).
4. As shown Table 5, CGRAM character patterns are selected when character code bits 4 to 7 are
all 0. However, since character code bit 3 has no effect, the R display example above can be selected by either
character code 00H or 08H.
5. 1 for CGRAM data corresponds to display selection and 0 to non-selection.
“-“: Indicates no effect.
V1.5 13 2000/8/03
ST7066
Instructions
Note:
Be sure the ST7066 is not in the busy state (BF = 0) before sending an instruction from the MPU to the ST7066.
If an instruction is sent without checking the busy flag, the time between the first instruction and next instruction
will take much longer than the instruction time itself. Refer to Instruction Table for the list of each instruction
execution time.
V1.5 14 2000/8/03
ST7066
INSTRUCTION DESCRIPTION
!" Clear Display
Code 0 0 0 0 0 0 0 0 0 1
Clear all the display data by writing "20H" (space code) to all DDRAM address, and set DDRAM address to "00H"
into AC (address counter). Return cursor to the original status, namely, bring the cursor to the left edge on first
line of the display. Make entry mode increment (I/D = "1").
!" Return Home
Code 0 0 0 0 0 0 0 0 1 x
Return Home is cursor return home instruction. Set DDRAM address to "00H" into the address counter. Return
cursor to its original site and return display to its original status, if shifted. Contents of DDRAM does not change.
!" Entry Mode Set
Code 0 0 0 0 0 0 0 1 I/D S
S I/D DESCRIPTION
H H Shift the display to the left
H L Shift the display to the right
V1.5 15 2000/8/03
ST7066
Code 0 0 0 0 0 0 1 D C B
Without writing or reading of display data, shift right/left cursor position or display. This instruction is used to
correct or search display data. During 2-line mode display, cursor moves to the 2nd line after 40th digit of 1st line.
Note that display shift is performed simultaneously in all the line. When displayed data is shifted repeatedly, each
line shifted individually. When display shift is performed, the contents of address counter are not changed.
S/C R/L Description AC Value
L L Shift cursor to the left AC=AC-1
L H Shift cursor to the right AC=AC+1
H L Shift display to the left. Cursor follows the display shift AC=AC
H H Shift display to the right. Cursor follows the display shift AC=AC
Code 0 0 0 0 1 DL N F x x
V1.5 16 2000/8/03
ST7066
V1.5 17 2000/8/03
ST7066
!" Read Busy Flag and Address
RS RW DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
When BF = “High”, indicates that the internal operation is being processed.So during this time the next
instruction cannot be accepted.
The address Counter (AC) stores DDRAM/CGRAM addresses, transferred from IR.
After writing into (reading from) DDRAM/CGRAM, AC is automatically increased (decreased) by 1.
!" Write Data to CGRAM or DDRAM
RS RW DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Code 1 0 D7 D6 D5 D4 D3 D2 D1 D0
Code 1 1 D7 D6 D5 D4 D3 D2 D1 D0
V1.5 18 2000/8/03
ST7066
Reset Function
V1.5 19 2000/8/03
ST7066
8-bit Interface (fosc=280KHz)
POWER ON
Function set
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 1 1 N F X X
Display clear
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 0 0 0 1
Initialization end
V1.5 20 2000/8/03
ST7066
4-bit Interface (fosc=280KHz)
POWER ON
Function set
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 1 0 X X X X
0 0 0 0 1 0 X X X X
0 0 N F X X X X X X
Display clear
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 X X X X
0 0 0 0 0 1 X X X X
Initialization end
V1.5 21 2000/8/03
ST7066
Interfacing to the MPU
The ST7066 can send data in either two 4-bit operations or one 8-bit operation, thus allowing interfacing with 4- or
8-bit MPU.
!" For 4-bit interface data, only four bus lines (DB4 to DB7) are used for transfer. Bus lines DB0 to DB3 are
disabled. The data transfer between the ST7066 and the MPU is completed after the 4-bit data has been
transferred twice. As for the order of data transfer, the four high order bits (for 8-bit operation, DB4 to DB7) are
transferred before the four low order bits (for 8-bit operation, DB0 to DB3). The busy flag must be checked (one
instruction) after the 4-bit data has been transferred twice. Two more 4-bit operations then transfer the busy flag
and address counter data.
!" For 8-bit interface data, all eight bus lines (DB0 to DB7) are used.
V5 V4 V3 V2 V1 Vcc Vcc V1 V2 V3 V4 V5
VLCD VLCD
V1.5 22 2000/8/03
ST7066
Timing Characteristics
RS VIH1
VIL1
TAS TAH
R/W
TPW TAH
E
TR TDSW TH
DB0-DB7 Valid
data
TC
RS VIH1
VIL1
TAS TAH
R/W
TR TPW TAH
E
TDDR TH
DB0-DB7 Valid
data
TC
V1.5 23 2000/8/03
ST7066
o
DC Characteristics ( TA = 25 C , VCC = 2.7 V – 4.5 V )
V1.5 24 2000/8/03
ST7066
o
DC Characteristics ( TA = 25 C, VCC = 4.5 V - 5.5 V )
V1.5 25 2000/8/03
ST7066
o
AC Characteristics (TA = 25 C, VCC = 5V)
V1.5 26 2000/8/03
ST7066
V1.5 27 2000/8/03
ST7066
The relations between Oscillation Frequency and LCD Frame Frequency
Assume the oscillation frequency is 280KHZ, 1 clock cycle time = 3.6us
1/16 duty; 1/5 bias,1 frame = 3.6us x 200 x 16 = 11520us=11.5ms
200 clocks
1 2 3 4 16 1 2 3 4 16 1 2 3 4 16
Vcc
V1
V2
COM1
V3
V4
V5
Vcc
V1
V2
COM2
V3
V4
V5
Vcc
V1
V2
COM16
V3
V4
V5
Vcc
V1
V2
SEGx off
V3
V4
V5
Vcc
V1
V2
SEGx on
V3
V4
V5
1 frame
V1.5 28 2000/8/03
ST7066
Assume the oscillation frequency is 280KHZ, 1 clock cycle time = 3.6us
1/11 duty; 1/4 bias,1 frame = 3.6us x 400 x 11 = 15840us=15.8ms
400 clocks
1 2 3 4 11 1 2 3 4 11 1 2 3 4 11
Vcc
V1
V2
COM1 V3
V4
V5
Vcc
V1
V2
COM2 V3
V4
V5
Vcc
V1
V2
COM11 V3
V4
V5
Vcc
V1
V2
SEGx off V3
V4
V5
Vcc
V1
V2
SEGx on V3
V4
V5
1 frame
V1.5 29 2000/8/03
ST7066
Assume the oscillation frequency is 280KHZ, 1 clock cycle time = 3.6us
1/8 duty; 1/4 bias,1 frame = 3.6us x 400 x 8 = 11520us=11.5ms
400 clocks
1 2 3 4 8 1 2 3 4 8 1 2 3 4 8
Vcc
V1
V2
COM1 V3
V4
V5
Vcc
V1
V2
COM2 V3
V4
V5
Vcc
V1
V2
COM8 V3
V4
V5
Vcc
V1
V2
SEGx off V3
V4
V5
Vcc
V1
V2
SEGx on V3
V4
V5
1 frame
V1.5 30 2000/8/03
ST7066
Enable
DATA
V1.5 31 2000/8/03
ST7066
COM1
.
.
.
.
.
COM8
ST7066
COM1
.
.
.
.
.
.
.
ST7066
.
COM11
V1.5 32 2000/8/03
ST7066
COM1
.
.
.
.
.
COM8
ST7066
COM9
.
.
.
.
.
COM16
COM1
.
.
.
.
.
COM8
ST7066
SEG1
.
.
.
.
SEG40
LCD Panel: 16
Characters x 1 line
COM9
.
.
.
.
.
COM16
V1.5 33 2000/8/03
2000/8/03
Dot Matrix LCD Panel
COM1-16 SEG1-40 S1-S40 S1-S40
D DL1 DR2 DL1 DR2
VDD DL2 VDD DL2
FCS DR1 FCS DR1
SHL1 ST7065 CL1 SHL1 ST7065 CL1
SHL2 CL2 SHL2 CL2
GND M GND M
VEE VEE
ST7066
34
V1 V2 V3 V4 V5 V6 V1 V2 V3 V4 V5 V6
VCC
V4
V5
DB0-DB7
Reg. Reg. Reg. Reg. Reg. Reg.
To MPU Vcc(+5V) -V or GND
ST7066
V1.5
ST7066
PACKAGE DIMENSIONS
V1.5 35 2000/8/03