Dot matrix Chinese character LED display production principle

The Chinese character display is widely used in daily life, and is widely used in major bus stations, railway stations, flight information bulletin boards, shop advertisements, and highway signs. Here is a practical method for making Chinese character display screens.

At the same time, in order to reduce the difficulty of production, only one word is displayed in turn. In actual use, the number of words displayed can be expanded according to this principle.

The principle of Chinese character display:

Taking the UCDOS Chinese Song font library as an example, each word is composed of a matrix of 16 rows and 16 columns. That is, each word in the national standard Chinese character library is represented by 256 dot matrix.

We can understand each point as a pixel and the glyph of each word as an image. In fact, this Chinese character screen can display not only Chinese characters, but also any graphic in the range of 256 pixels.

Controlled by an 8-bit AT89C51 microcontroller, since the bus of the microcontroller is 8 bits, one word needs to be split into 2 parts.

Generally we split it into upper and lower parts, the upper part is composed of 8*16 dot matrix, and the lower part is also composed of 8*16 dot matrix. In this example, the MCU first displays the upper half of the first column in the upper left corner, that is, the p00---p07 port in the 0th column. The direction is p00 to p07. When the Chinese character is "large", p05 lights up and is arranged from top to bottom, p0.0 is off, p0.1 is off, p0.2 is off p0.3 off, p0.4 is off, p0. 5 is lit, p0.6 is off, and p0.7 is off. That is, binary 00000100, converted to hexadecimal for 04h

After the first column of the upper half is completed, continue to scan the first column of the lower half. For the convenience of wiring, we still design to scan from top to bottom, that is, from p27 to p20. As can be seen from the above figure, this All columns are not lit, that is, 00000000, and hexadecimal is 00h.

Then the single-chip microcomputer turns to the second column of the upper half, and is still lit by p05, which is 00000100, that is, hexadecimal 04h.

After this column is completed, the second half of the scan is continued, and p21 is lit, which is binary 00000010, that is, hexadecimal 02h. According to this method, the following scan is continued, and a total of 32 8 bits are scanned, and the Chinese character "big" can be obtained. The scan code is:

04H, 00H, 04H, 02H, 04H, 02H, 04H, 04H

04H, 08H, 04H, 30H, 05H, 0C0H, 0FEH, 00H

05H, 80H, 04H, 60H, 04H, 10H, 04H, 08H

04H,04H,0CH,06H,04H,04H,00H,00H

It can be seen from this principle that no matter which font or image is displayed, this method can be used to analyze its scan code and display it on the screen.

However, there are a lot of ready-made Chinese character font generation software, so we don't have to draw the table calculation code ourselves.

After the software is opened, input Chinese characters, click “Check”, the Chinese character code of hexadecimal data can be automatically generated, and the vertical data we need can be copied into our program. We connect the row and bus bus to the i0 port of the MCU, and then send the scan code analyzed above to the bus, and we can get the displayed Chinese characters.

In this example, since there is a total of 16 rows and 16 columns, if all of them are connected to the 89c51 microcontroller, a total of 32 io ports are used, which causes the io resources to be exhausted, and the system has no room for expansion. In practical applications, we use the 4-16 line decoder 74ls154 to complete the column direction display. The 16 lines in the row direction are connected to the p0 port and the p2 port.

Program list:

Double click on the code to select all

The row direction of the circuit is scanned by the p0 port and the p2 port. Since the p0 port has no pull-up resistor, a 4.7k*8 resistor pull-up is connected. If there is no exclusion, 8 ordinary 4.7k 1/8w resistors can be used. To provide load capacity, connect 16 2n5551 NPN triode drivers.

The column direction is scanned by the 4-16 decoder 74LS154, which is controlled by P1.0---P1.3 of 89C51. Similarly, the drive section is completed with 16 2N5401 triodes.

The power supply of the circuit is a LM7805 three-terminal regulator with a current consumption of about 100Ma.

0 times
Window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": " 0", "bdSize": "24" }, "share": {}, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "Share to:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren" , "weixin"] } }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share. Baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];

Alps Rotary Switch

Alps Rotary Switch,Rotary Switch Enclosure,Rotary Switch Light Socket,Rotary Switch For Floor Lamp

DA CHENG MINGHUA LIMITED , https://www.alpsswitch.com