Universal LCD1602 custom character display

LCD1602 is mainly used to display numbers, letters, graphics and a small number of custom characters. Because of its simple display control and high cost performance, it is widely used in electronic watches, refrigerators, air conditioners, automotive electronic instruments and other devices. This article focuses on how to display custom characters on the LCD1602. Although the technical content is not high, but pay attention to the details of programming is still necessary to explore.

1 Introduction

The liquid crystal display's English name is Liquid CrystalDisplay, referred to as LCD. Liquid crystal display as a display device has the advantages of small size, light weight, low power consumption, high cost performance, etc., so LCD has become an ideal display for various portable electronic products, and 1602 LCD is also called 1602. Character LCD, which is a dot-matrix liquid crystal module specially used to display letters, numbers, symbols, etc. It has several 5X7 or 5X11 dot matrix characters, and each dot character can display one character. There is a dot spacing between each bit, and there is also a gap between each line, which plays the role of character spacing and line spacing. Because of this, it can't display graphics like 12864, but sometimes it wants to graphically represent it. Then, LCD1602 provides 8 spaces of custom characters, as shown in Figure 1, the year and month of the display, .C is a custom character.

Lcd1602 display principle

2. Universal LCD1602 operation method

LCD1602 means that the displayed content is 16X2, that is, two lines of 16-character liquid crystal modules (display characters and numbers) can be displayed.

At present, most of the character LCDs on the market are based on the HD44780 liquid crystal chip, and the control principle is completely the same. Therefore, the control program written based on HD44780 can be conveniently applied to most of the character liquid crystals on the market.

As shown in Figure 2, the character LCD 1602 usually has 14 pin lines or 16 pin lines of LCD. The extra 2 lines are the backlight power line VCC (15 feet) and the ground line GND (16 pins). Left to right are 1 pin to 16 pin, respectively. Here is the description:

(1) To display characters with the 1602 LCD, three problems must be solved: a. The character ASCII standard code to be displayed is generated; b. The setting of the liquid crystal display mode; c. The designation of the character display position.

(2) If you want to display data at 00H, you must add 00H to 80H, which is 0x00H+0x80H. To display data at 01H, you must also add 0x80H. For example, you want to display a character on the 2nd line and 5th. Column, then the instruction code for determining the address should be 80H+44H=C4H. and so on.

(3) CGRAM is a user-defined character graphic, which can be defined by 8.

(4) LCD1602 has only 11 instructions, and learn to use these 11 instructions, you can easily control.

(5) In order for the LCD to display characters, it is necessary to set whether or not the cursor, the direction of movement of the cursor, whether the cursor is blinking, and the direction in which the characters move, in order to obtain the desired display effect.

The setting of the 1602 liquid crystal display mode is realized by the control command to the internal controller. The commonly used control commands are shown in Table 8-5. For example, the display mode should be set to "16X2 display, 5X7 dot matrix, 8-bit data interface. ", just write binary instruction code 00111 000B to the liquid crystal module, that is, hex code 38H.

(6) LCD is a slow display device, so you must read the busy state of the LCD before writing each instruction. If the LCD is busy processing other instructions, wait; if not busy, execute the write command. To this end, the 1602 LCD has a busy flag bit BF that is linked to the DB7 bit of the 8-bit bidirectional data line. If BF is low level “0”, it means LCD is not busy; if BF is high level “1”, it means LCD is busy and needs to wait. Assume that the 8-bit bidirectional data line (DB0~DB7) of the 1602 LCD is transmitted through the P0 port of the MCU. As long as the P0.7 pin level of the P0 port (DB is connected to P0.7) is detected, it can be known to be busy. The status of the flag bit BF.

Led Underground Lamp is a new type of buried decoration lamp with high brightness LED as the light source and LED constant current drive as the driving mode.Widely used in square, park, leisure places, such as outdoor lighting, outdoor as well as park, square, garden greening, lawn, flower beds, pedestrian street, waterfalls, fountains, water etc illumination, add luster for life.

LED Underground Lamp

Product size

LED Underground Lamp


Technical parameters 

Main material

High - pressure cast aluminum, 92% high - light steel screen printing glass

The light colored temperature

Red/Green/Yellow/Amber/Vermilion/Acid blue/3000K/4000K/5000K/6000K

 

Surface treatment

UV  Polyester powder coating

Light distribution device

Reflector lamp cup series:6°

Optical lens series:8°/15°/25°/45°/10×30°/10×60°/20×40°

The light body color

Dark grey

Working voltage

DC24V

Safeguard procedures

Silica gel ring compacted waterproof

way to install

Embedded part

Average lifetime

350mA20000hours,500mA15000hours

rated power

/

Control mode

/

Level of protection

IP65

operating ambient temperature

-25℃~50℃

Working environment humidity

10%~90%







LED Underground Lamp

Led Underground Lamp ,Led Underground Headlamp,Led Cap Lamp Underground Mining,Underground Led Cap Lamps

Jiangsu chengxu Electric Group Co., Ltd , https://www.satislighting.com

Posted on