
Chinese characters display in the daily life of a wide range of applications, a large number of used in the major bus stations, railway stations, flight information bulletin boards, shops advertising, highway signs, and so on. Here introduced a practical Chinese character display production methods.
At the same time in order to reduce the difficulty of making, only a word of the rotation display, the actual use of this principle can be self-expansion of the number of words displayed.
Chinese characters show the principle:
To UCDOS Chinese characters as an example, each word consists of 16 rows and 16 columns of the dot matrix composition display. That is, the national standard Chinese characters in the word by 256 dot matrix to represent.
We can understand each point as a pixel, and each word of the word is understood as an image. In fact, this Chinese character screen can not only display Chinese characters, but also can display any 256 pixels in the range of graphics.
With 8-bit AT89C51 microcontroller control, because the microcontroller bus for the 8-bit, a word need to be split into two parts.
In general, we split it into the upper and lower parts, the upper part of the array by the 8 * 16 dot matrix, the lower part is also composed of 8 * 16 dot matrix. In this case, the microcontroller first shows the upper half of the first column of the upper left corner, that is, the p00 --- p07 port of column 0. The direction of p00 to p07, display Chinese characters "big", p05 lit, from top to bottom, p0.0 off, p0.1 off, p0.2 off p0.3 off, p0.4 off, p0. 5 light, p0.6 off, p0.7 off. Binary 00000100, converted to hexadecimal for 04h.
After the first column is completed, continue to scan the first half of the second half, in order to facilitate the wiring, we are still designed to scan from top to bottom, that is, from p27 to p20 direction scan, you can see from the figure A column is all off, that is 00000000, 16 hexadecimal is 00h.
Then the microcontroller to the upper half of the second column, still p05 light, 00000100, that is, hexadecimal 04h.
After the completion of this column to continue the second part of the scan, p21 lit, binary 00000010, that is, hexadecimal 02h. According to this method, continue to scan the following, a total of 32 8-bit scan, can be drawn " 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
From this principle can be seen, no matter what kind of font or image, you can use this method to analyze its scan code to display on the screen.
But now there are a lot of ready-made Chinese characters form the software, we do not have to look at their own table code.
After the software opens, enter the Chinese characters, click "check", the hexadecimal data of the Chinese character code can be automatically generated, we need to copy the vertical data to our program can be. We put the ranks of the bus connected to the microcontroller i0 mouth, and then the above analysis of the scan code into the bus, you can get the display of the Chinese characters.
In this case, because a total of 16 lines, 16 columns, if all of its access to 89c51 microcontroller, a total of 32 io mouth, which caused the io resource depletion, the system no longer room for expansion. In practical applications, we use the 4-16 line decoder 74ls154 to complete the column direction display. While the line direction 16 lines are connected to p0 mouth and p2 mouth.
List of procedures:
Double-click Code Select All
Circuit in the direction of the line from the p0 mouth and p2 port to complete the scan, because the p0 mouth no pull-up resistor, so then a 4.7k * 8 exclusion pull. If there is no exclusion, can also be used 8 ordinary 4.7k 1 / 8w resistance. To provide load capacity, then 16 2n5551 NPN transistor drive.
Column direction by the 4-16 decoder 74LS154 to complete the scan, which by the 89C51 P1.0 --- P1.3 control. Similarly, the drive part is 16 2N5401 transistor completed.
Circuit power supply for a LM7805 three-terminal regulator, power consumption of about 100Ma.
