The 1602 uses a standard 14-pin interface, where:

Pin 1: VSS is ground power

Pin 2: VDD is connected to 5V positive power

Pin 3: V0 is the contrast adjustment terminal of the liquid crystal display. When the positive power supply is connected, the contrast is the weakest. When the power supply is grounded, the contrast is the highest. When the contrast is too high, “ghosting” occurs. When using it, a 10K potentiometer can be used to adjust the contrast.

Pin 4: RS is the register selection. Select the data register at high level and select the instruction register at low level.

Pin 5: RW is the read/write signal line, read operation is performed at high level, and write operation is performed at low level. When RS and RW are both at a low level, an instruction or display address can be written. When RS is low and RW is high, a busy signal can be read. When RS is high, RW is low, data can be written.

Pin 6: The E-side is the enable end. When the E-side transitions from high to low, the LCD module executes the command.

7th to 14th feet: D0~D7 are 8-bit bidirectional data lines.

In addition, the pins “A” and “K” are backlight pins, “A” is connected positively, and “K” is connected negatively to light the backlight.

The 1602 liquid crystal module internal character generator memory (CGROM) has stored 160 different dot matrix character patterns, as shown in Table 1, these characters are: Arabic numerals, English capitals, common symbols, and Japanese pseudonyms, etc. Each character has a fixed code. For example, if the capital letter "A" is 01000001B (41H), the module displays the dot character pattern in address 41H, and we can see the letter "A". ”

Great God teaches you 1602 LCD display experiment

There are 11 control commands for the controller inside the 1602 LCD module, as shown in Table 2.

Great God teaches you 1602 LCD display experiment

Its read and write operations, screen and cursor operations are all achieved through instruction programming. (Note: 1 is high and 0 is low)

Instruction 1: Clear display, instruction code 01H, cursor reset to location 00H

Instruction 2: The cursor is reset and the cursor returns to address 00H

Command 3: Cursor and Display Mode I/D: Cursor movement direction, high right shift, low level left shift S: Whether the whole text on the screen moves to the left or right. High level means valid, low level is invalid

Instruction 4: Display switch control. D: Control the overall display on and off, high level indicates open display, low level indicates off display C: control cursor on and off, high level indicates cursor, low level indicates no cursor B: control cursor is Flashing, high flash, low flash

Command 5: Cursor or display shift S/C: Moves the displayed text when it is high, and moves the cursor when it is low

Command 6: Function setting command DL: 4-bit bus at high level, 8-bit bus at low level, N-bit display at low level, and single-line display at low level. When the level is high, double-line display F: low-level display 5x7 dot matrix characters. Display 5x10 dot matrix characters at high level

Instruction 7: Character Generator RAM Address Setting

Instruction 8: DDRAM address setting

Instruction 9: Read busy signal and cursor address BF: busy flag, high indicates busy, the module cannot receive commands or data at this time, if it is low, it indicates that it is not busy.

Command 10: Write data

Command 11: Reading data

The liquid crystal display module is a slow display device. Therefore, before executing each instruction, it is necessary to confirm that the busy flag of the module is low, indicating that it is not busy, otherwise the instruction is invalid. To display characters, first enter the display character address, which is to tell the module where to display characters. Table 3 is the internal display address of the DM-162.

Great God teaches you 1602 LCD display experiment

For example, if the address of the first character in the second line is 40H, then whether to directly write 40H can position the cursor at the position of the first character in the second line? This will not work, because writing the display address requires the highest bit D7 to always be high, so the actual data that should be written should be 01000000B(40H)+10000000B(80H)=11000000B(C0H)

Great God teaches you 1602 LCD display experiment

RSEQUP3.7

RWEQUP3.6

EEQUP3.5

Movp3, #0ffh

MOVP1, #01H; Clear Screen

ACALLENABLE

MOVP1, #38H; 8 bit matrix

ACALLENABLE

MOVP1, #0FH; On Display

ACALLENABLE

MOVP1, #06H; Move the cursor

ACALLENABLE

MOVP1, #80H; Display position

ACALLENABLE

L3:movp1,#01h

Acallenable

Movdptr, #table1; send first sentence

Callwrite1

Callenable

MOVP1, #0C0H; Write display start address (first position in second row)

ACALLENABLE; Call Write Command Subroutine

Callwrite1

Callenable

Movp1, #01h

Calldelay1

Calldelay1

Calldelay1

Jmpl3

ENABLE:; send command

CLRRS

CLRRW

CLRE

ACALLDELAY

SETBE

RET

Write1:; send the string

Movr1, #00h

A1:mova,r1

Movca, @a+dptr

Callwrite2

Incr1

Cjnea, #00h, a1; 00H end of the string

Ret

Write2:;Send a single character

Movp1,a

Setbrs

Clrrw

Clre

Calldelay

Setbe

Ret

Delay:; delay subroutine

Movr7, #255

D1:movr6,#255

D2:djnzr6,d2

Djnzr7,d1

Ret

Delay1:

Movr7, #255

Delay2:movr6,#255

Djnzr6,$

Djnzr7,delay2

Ret

Each of the following forms is a sentence, with 00H as the end of each sentence.

Table1: db20h, 20h, 20h, 57h, 45h, 4ch, 43h, 4fh, 4dh, 45h, 20h, 54h, 4fh, 20h, 20h, 20h, 20h, 00h

Table2: db20h, 57h, 57h, 57h, 2Eh, 4dh, 43h, 55h, 39h, 39h, 2Eh, 43h, 4Fh, 4Dh, 20h, 20h, 20h, 00h

End

14 Inch Laptop

For the passed long time, the main sizes of laptops fell into three ones, 13 Inch Budget Laptop For Student, especially elementary or middle school or prefer smaller size; 17.1 inch graphic laptop for the ones prefer higher performance and bigger screen; 15.6 inch Budget Working Laptop for all others left. However, 14 Inch Laptop is becoming the main trend now, 11 Inch Laptop and 10.1 Inch Laptop also available at the market and our store.

14 Inch Gaming Laptop with i3, i5, i7 10th generation is a great choice for those who do heavy jobs and often go to business trip, like interior designers, engineering or architecture students or workers, etc. Of course, 14 Inch Laptop With Graphics Card, 16.1 inch i7 16gb ram 4gb graphics laptop also alternatives.

Of course, other Laptop 14 Inch I5 or 14 Inch To CM Laptop you can see also at this store. To save time, you can contact directly and share exact configuration so that we can provide right and valuable information quickly for you.

Except business, any we can do in China, just let us know also.

Not only want to cooperate, but also hope be your friend in China.

14 Inch Laptop,14 Inch Gaming Laptop,Laptop 14 Inch I5,14 Inch Laptop With Graphics Card,14 Inch To Cm Laptop

Henan Shuyi Electronics Co., Ltd. , https://www.shuyitablet.com