Text preview for : lcdinfo.pdf part of powertip all lcd address instructions i found this info hard to find



Back to : lcdinfo.pdf | Home

2405 Commerce Circle, Alamosa CO 81101 ~ Tel: (719) 589 3122 ~ Fax: (719) 589 3592 ~ Web: www.p-tec.net

Address Instruction Guide
(1) Clear Display RS 0 R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 0 1

Writes space code "20H" into all DD RAM addresses. Sets DD RAM address 0 in address counter. Returns display to its original status if it was shifted. In other words, the display disappears and the cursor or blink go to the left edge of the display (the first line if 2 lines are displayed). Set I/D 1 (Increment Mode) of Entry Mode. S of Entry Mode doesn't change. (2) Return Home RS 0 R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 1 *
* Don't care

Sets the DD RAM address 0 in address counter. Returns display to its original status if it was shifted. DD RAM contents do not change. The cursor or blink go to the left edge of the display (the first line if 2 lines are displayed). (3) Entry Mode Set RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 1 I/D S

I/D:

S:

Increments (I/D=1) or decrements (I/D=0) the DD RAM address by 1 when a character code is written into or read from the DD RAM. The cursor or blink moves to the right when incremented by 1 and to the left when decremented by 1. The same applies to writing and reading of CG RAM. Shifts the entire display either to the right or the left when S is 1; to the left when I/D=1 and to the right when I/D=0. Thus it looks as if the cursor stands still and the dis play moves. The display does not shift when reading from the DD RAM, when writing into or reading out from the CG AM does it shift when S=0. RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 1 D C B

(4) Display ON/OFF Control

D: C:

B:

The display is ON when D=1 and OFF when D=0. When off due to D=0, display data remains in the DD RAM. It can be displayed immediately by setting D=1. The cursor display when C=1 and does not display when C=0. Even if the cursor disappears, the function of I/D, etc. does not change during display data write. The cursor is displayed using 5 dots in the 8th line when the 5x7 dot character font is selected, and 5 dots in the 11th line when the 5x10 dot character font is selected. The character indicated by the cursor blinks when B=1. The blink is displayed by switching between all blank dots and display characters at 409.6ms interval when fcp or fosc=250kHz. The cursor and the blink can be set to display simultaneously. (The blink frequency changes according to the reciprocal of fcp or fosc. 409.6 x 250/270 = 379.2ms when fcp=270kHz.)

4-1

2405 Commerce Circle, Alamosa CO 81101 ~ Tel: (719) 589 3122 ~ Fax: (719) 589 3592 ~ Web: www.p-tec.net (5) Cursor or Display Shift RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 1 S/C R/L * *
*Don't care

Shifts cursor position or display to the right or left without writing or reading display data. This function is used to correct or search for the display. In a 2 line display, the cursor moves to the 2nd line when it passes the 40th digit of the 1st line. Notice that the 1st and 2nd line displays will shift at the same time. When the displayed data is shifted repeatedly each line only moves horizontally. The 2nd line display does not shift into the 1st line position. S/C 0 0 1 1 R/L 0 1 0 1

Shifts the cursor position to the left. (AC is decremented by one.) Shifts the cursor position to the right. (AC is incremented by one.) Shifts the entire display to the left. The cursor follows the display shift. Shifts the entire display to the right. The cursor follows the display shift.

Address counter (AC) contents do not change if the only action performed is shift display. (6) Function Set RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 DL N F * * Sets interface data length. Data is sent or received in 8 bit lengths (DB7-DB0) when DL=1, and in 4 bit lengths (DB7-DB0) when DL=0. When the 4 bit length is selected, data must be sent or received twice. Sets number of display lines. Sets character font.
*Don't care

DL:

N: F:

(7) Set CG RAM address

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 1 A A A A A A

Sets the CG RAM address into address counter in binary AAAAAA. Data is then written or read from the MPU for the CG RAM. (8) Set DD RAM address RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 1 A A A A A A A

Sets the DD RAM address into address counter in binary AAAAAAA. Data is then written or read from the MPU for the DD RAM. However, when N=0 (1 line display), AAAAAAA is 0H - 4FH. When N=1 (2 line display), AAAAAAA is 0H - 27H for the first line, and 40H - 67H for the second line.

4-2

2405 Commerce Circle, Alamosa CO 81101 ~ Tel: (719) 589 3122 ~ Fax: (719) 589 3592 ~ Web: www.p-tec.net (9) Read Busy Flag and Address RE R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 1 BF A A A A A A A
Higher Order Bits Lower Order Bits

Reads the busy flag (BF) that indicates the system is now internally operating by a previously received instruction. BF=1 indicates that internal operation is in progress. The next instruction will not be accepted until BF is set to "0". Check the BF status before the next wire operation.At the same time, the value of the address counter expressed in binary AAAAAAA is read out. The address counter is used by both CG and DD RAM addresses, and it's value is determined by the previous instruction. Address contents are the same as in (7) and (8). (10) Write Data to CG or DD RAM RE R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 1 0 D D D D D D D D
Higher Order Bits Lower Order Bits

Writes binary 8 bit data DDDDDDDD to the CG or the DD RAM. Whether the CG or DD RAM is to be written into is determined by the previous specification of CG RAM or DD RAM address setting. After write, the address is automatically incremented or decremented by 1 according to entry mode. The entry mode also determines display shift. (11) Read Data from CG or DD RAM RE R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 1 1 D D D D D D D D
Higher Order Bits Lower Order Bits

Reads binary 8 bit data DDDDDDDD from the CG or DD RAM. The previous designation determines whether the CG or DD RAM is to be read. Before entering the read instruction, you must execute either the CG RAM or DD RAM address set instruction. If you don't, the first read data will be invalidated. When serially executing the "read" instruction, the next address data is normally read from the second read. The "address set" instruction need not be executed just before the "read" instruction when shifting the cursor by cursor shift instruction (when reading out DD RAM). The cursor shift instruction operation is the same as that of the DD RAM's address set instruction. After a read, the entry mode automatically increases or decreases the address by 1. However, display shift is not executed no matter what the entry mode is.

4-3

2405 Commerce Circle, Alamosa CO 81101 ~ Tel: (719) 589 3122 ~ Fax: (719) 589 3592 ~ Web: www.p-tec.net

INSTRUCTION
(1) 8 BITS : Power ON (2) 4 BITS : Power ON

Wait more than 15 ms after VDD Rises to 4.5V

Wait more than 15 ms after VDD Rises to 4.5V

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 * * * *

RS R/W DB7 DB6 DB5 DB4 0 0 0 0 1 1 Wait more than 4.1 ms

Wait more than 4.1 ms RS R/W DB7 DB6 DB5 DB4 0 0 0 0 1 1 Wait more than 100 µs Wait more than 100 µs RS R/W DB7 DB6 DB5 DB4 0 0 0 0 1 1 RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 * * * * RS R/W DB7 DB6 DB5 DB4 0 0 0 0 1 0 0 0 0 0 1 0 0 0 N F * * 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 I/O S

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 * * * *

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 N F * * 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 D/S S

4-4

2405 Commerce Circle, Alamosa CO 81101 ~ Tel: (719) 589 3122 ~ Fax: (719) 589 3592 ~ Web: www.p-tec.net
INSTRUCTION CODE DESCRIPTION EXECUTION TIME (MAX) (when fcp or fosc is 250kHz)

CLEAR DISPLAY RETURN HOME ENTRY MODE SET DISPLAY ON/OFF CONTROL CURSOR OR DISPLAY SHIFT FUNCTION SET SET CG RAM ADDRESS SET DD RAM ADDRESS READ BUSY FLAG & ADDRESS WRITE DATA TO CG OR DD RAM READ DATA FROM CG OR DD RAM

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 0 0 1 Clear entire display and sets DD RAM 0 in address counter. 0 0 0 0 0 0 0 0 1 * Sets DD RAM address 0 in address counter. Also returns display being shifted to original position. DD RAM contents remain unchanged. 0 0 0 0 0 0 0 1 I/D S Sets cursor move direction and specifies shift of display. These operations are performed during data write and read. 0 0 0 0 0 0 1 D C B Sets ON/OFF of entire display (D), cursor ON/ OFF (C), and blink of cursor position character (B). 0 0 0 0 0 1 S/C R/L * * Moves cursor and shifts display without changing DD RAM contents. 0 0 0 0 1 DL N F * * Sets interface data length (DL), number of display lines (L) and character font (F). 0 0 0 1 AGC Sets CG RAM address. CGRAM data is sent and received after this setting. 0 0 1 ADD Sets DD RAM address. DD RAM data is sent and received after this setting. 0 1 BF AC Reads Busy flag (BF) indicating internal operation is being performed and reads address counter contents. 1 0 WRITE DATA Writes data into DDRAM or CG RAM

1.64ms

1.64ms 40µs 40µs 40µs 40µs 40µs 40µs 0µs 40µs 40µs
Execution time changes when frequency changes, (Example) When fcp or fosc is 270kHz, 40us(250/270) =37us

1

1

READ DATA

Reads data from DD RAM or CG RAM DD RAM: CG RAM: ACG: ADD: AC: Display data RAM. Character generator RAM. CG RAM address. DD RAM address. Corresponds to cursor address. Address counter used for both DD and CG RAM address.

I/D: S: S/C: R/L: DL: N: F: BF:

1=Increment

0=Decrement

1=Accompanies display shift 1=Display shift 0=Cursor shift 1=Shift to the right. 0=Shift to the left. 1=8 bits 0=4 bits 1=2 lines 0=1 line 1=5x10 dots 0=5x7 dots 1=Internally operating. 0=Can accept instruction.

Optical Specifications
Absolute Maximum Ratings
Item Symbol Test Condition Standard max. 7 Vdd + 0.3 Vdd + 0.3 50 70 Extended min. -0.3 Vdd - 13.5 -0.3 -20 -30 max. 7 Vdd + 0.3 Vdd + 0.3 70 80 Unit min. Ta = 25 °C -0.3 Ta = 25 °C Vdd - 13.5 Ta = 25 °C -0.3 0 -20 Supply voltage for logic Supply voltage for LCD drive Input voltage Operating temp Storage temp Vdd - Vss Vlcd Vin Topr Tstg V V V °C °C

4-5

2405 Commerce Circle, Alamosa CO 81101 ~ Tel: (719) 589 3122 ~ Fax: (719) 589 3592 ~ Web: www.p-tec.net

TN type (STN type)
ITEM Viewing Angle Contrast Ratio Response Time (rise) Response Time (fall) SYMBOL MIN TYP MAX UNIT 2 - 1 20 (40) - [-] - [-] deg. K -[3] 3[-] - [-] Tr 200[200] 250[300] ms Tf 200[250] 300[350] ms CONDITION K = 1.4 =25 [10], =0 =25 [10], =0 =25 [10], =0

Note A: Definition of Angle &

Note B: Definition of Viewing Angle 1 & 2

K

Viewing Angle = 2 - 1

2

Y(=180 )

1

X

X'

Contrast Ratio 1.4

Y'(=0 )

Note C: Definition of Contrast Cr Brightness curve of selected area 100% Brightness curve of selected area
Brightness

1



2

Note D: Definition of Optical Response

a 0% Vop b Driving Voltage Contrast ratio =
Brightness of selected area ("a") Brightness of non-selected area

Time

Top = 25 deg / Vop = At optimum contrast ratio / X = Y= 0 deg

4-6

2405 Commerce Circle, Alamosa CO 81101 ~ Tel: (719) 589 3122 ~ Fax: (719) 589 3592 ~ Web: www.p-tec.net

Custom Design Guide
Dimensional Profile (mm) A Display Height B Display Length C Viewing Height D Viewing Length E Diameter of Mounting Hole F Mounting Hole Height G Mounting Hole Length H Module Height I Module Length J Upper Thickness K Overall Thickness Character: Graphic: Display: Number: Alpha-Numeric: Clock: Viewing Angle: Type: TN ___, STN___, FSTN___, Other___ Transmissive___ 3:00___ _____Characters,
E J K

H F C A B D G I

_____ Lines _____Dots (Vertical)

_____Dots (Horizontal),

(Display Art coordination often required) 6:00___ 9:00___ 12:00___

Reflective___, Interface: No Pin___, Back Lighting: EL___,

Transflective___,

Pin___,

Heat Seal___,

Zebra___

LED___,

CCFL___,

Other___,

None___

4-7