The subprogram of LCD1602 liquid crystal shall be completed in accordance with the sequence diagram in the manual. If you want to display the LCD, you need to initialize the LCD first. After LCD initialization, the position of characters and the function of writing data need to be defined. The address of the first line is 40H ~ 4fh, and the address of the second line is 80h ~ 8fh. The characters are then displayed based on the ASCII code of the character to be displayed. LCD1602 shows the program flow chart, as shown in Figure 2.13.Implementation process: first, perform the initialization function lcdinit() to initialize the LCD program, then perform the lcdwritedata() function to write data, code lcd1602_e = 0 to enable zeroing, lcd1602_rs = 1 to select to write data, lcd1602_rw = 0 to select to write; code lcd1602_datapins = dat to transfer the high four bits, and then perform the delay operation, lcd1602_e= 1 write timing, then delay operation; code LCD1602 ﹣ datapins = dat