(11) LCD1602 liquid crystal display

LCD1602 (Liquid Crystal Display) LCD is a character-type liquid crystal display module, which can display ASCII standard characters and some other built-in special characters, and can also have 8 custom characters, with its own chip scanning

Display capacity: 16×2 characters, each character is 5*7 dot matrix

Please add a picture description

Please add a picture description

Please add a picture description

Please add a picture description

Timing structure:

Please add a picture description

Please add a picture description

Command 1: Clear the display, reset the cursor to the address 00H.

Command 2: Cursor reset, the cursor returns to address 00H.

Instruction 3: Cursor and display mode setting I/D: Cursor movement direction, high level moves to the right, low level moves to the left, S: whether all the characters on the screen move to the left or to the right. High level means valid, low level is invalid.

Instruction 4: Display switch control. D: Control the on and off of the overall display, high level means on display, low level means off display C: control the on and off of the cursor, high level means there is a cursor, low level means no cursor B: control whether the cursor is on or off Flashing, flashing at high level, not flashing at low level.

Instruction 5: Cursor or display shift S/C: move the displayed text when the level is high, and move the cursor when the level is low. R/L, high to the left, low to the right.

Instruction 6: Function setting command DL: 4-bit bus at high level, 8-bit bus at low level N: single-line display at low level, double-line display at
high level F: 5x7 dot matrix characters at low level, Display 5x10 dot matrix characters when high level. (Some modules are DL: 8-bit bus when high level, 4-bit bus when low level)

Instruction 7: character generator RAM address setting, address: character address 8+ character line number. (Divide a character into 5 8 dot matrix, write one line at a time, 8 lines form a character)

Instruction 8: set display address, the first line: 00H——0FH, the second line: 40H——4FH.

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

Command 10: Write data.

Command 11: Read data.

Please add a picture description

Guess you like

Origin blog.csdn.net/Falling_Asteroid/article/details/130737209