Home >
Microcontroller >Microcontroller Production > Circuit principle and production of dot matrix Chinese character LED display
Circuit principle and production of dot matrix Chinese character LED display
Source: InternetPublisher:三岁就很酷 Updated: 2018/03/05
Chinese character display screens are widely used in car stop announcers, advertising screens, etc. This article introduces the production of a practical Chinese character display screen. Taking into account the ease of purchase of circuit components, the 8*8 dot matrix light-emitting tube module is not used. Instead, 256 high-density light-emitting tubes are directly used to form 16 rows of 16 Column of glowing lattice. 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 displayed words can be expanded based on this principle. 1 Principle of Chinese character display: We take UCDOS Chinese Song Dynasty font library as an example. Each character is displayed in a dot matrix composed of 16 rows and 16 columns. That is, each character in the national standard Chinese character library is represented by a 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 not only display Chinese characters, but also any graphics within the 256 pixel range.
It is controlled by an 8-bit AT89C51 microcontroller. Since the bus of the microcontroller is 8 bits, a word needs to be split into two parts. Generally we split it into an upper part and a lower part. The upper part is composed of 8*16 dots, and the lower part is also composed of 8*16 dots. In this example, the microcontroller first displays the upper half of the first column in the upper left corner, that is, the p00---p07 ports in column 0. The direction is from p00 to p07. When the Chinese character "big" is displayed, p05 lights up. Arranged from top to bottom, p0.0 is off, p0.1 is off, p0.2 is off, p0.3 is off, p0.4 is off, and p0. 5 is on, p0.6 is off, and p0.7 is off. That is, binary 00000100, converted to hexadecimal is 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 are still designed to scan from top to bottom, that is, from p27 to p20. As you can see from the picture above, this If a column is all off, it is 00000000, which in hexadecimal is 00h. Then the microcontroller turns to the second column in the upper half, p05 is still lit, which is 00000100, which is 04h in hexadecimal. After this column is completed, it continues to scan the lower half, and p21 is lit, which is binary 00000010, which is 02h in hexadecimal. . According to this method, continue the following scanning, scanning a total of 32 8-digits, and you can get the scanning code of the Chinese character "big": 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 what is displayed For any font or image, this method can be used to analyze its scan code and display it on the screen. But now there are many ready-made Chinese character template generation software, so we don’t have to draw tables and calculate codes ourselves.
After opening the software, enter Chinese characters and click "Retrieve". The Chinese character code of the hexadecimal data will be automatically generated. Just copy the vertical data we need into our program. We connect the row and column bus to the i0 port of the microcontroller, and then send the scan code analyzed above into the bus, and then we can get the displayed Chinese characters. In this example, since a total of 16 rows and 16 columns are used, if all of them are connected to the 89c51 microcontroller, a total of 32 IO ports will be used, which will cause the IO resources to be exhausted and the system will have no room for expansion. In practical applications, we use the 4-16 line decoder 74ls154 to complete the display in the column direction. The 16 lines in the row direction are connected to the p0 port and p2 port.
Program list: ORG 00H LOOP: MOV A, #0FFH; Power on initialization, clear screen MOV P0, A; Clear P0 port ANL P2, #00; Clear P2 port MOV R2, #200 D100MS: MOV R3, #250; Delay 100 milliseconds DJNZ R3,$ DJNZ R2,D100MS MOV 20H,#00H; Initial value of code pointer l100: MOV R1,#100; Residence time of each word L16: MOV R6,#16; 16 codes per word MOV R4, #00H; Clear the scan pointer to zero MOV R0, 20H; Store the code pointer in R0 L3: MOV A, R4; Store the scan pointer in A MOV P1, A; Scan the output INC R4; Add 1 to the scan pointer and scan down A MOV A,R0; Store the code pointer in A MOV DPTR,#TABLE; Get the code of the upper half of the data table MOVC A,@A+DPTR MOV P0,A; Output to P0 INC R0; Add 1 to the code pointer , take down the next code. MOV A,R0 MOV DPTR,#TABLE; take the code MOVC A from the lower part of the data table
Latest Microcontroller Circuits
- How to Make a PIC Programmer
- Interface circuit composed of photocoupler
- How to Implement a Bipolar LED Driver Circuit Using 8051 Microcontroller
- How to use ESP32 to implement the design of air quality monitoring system
- Application circuit composed of CSJ-R05B and microcontroller
- A safe and reliable IC card reader/writer system circuit
- Minimum system circuit of XC4003
- Microcomputer motherboard reset part circuit diagram
- a watchdog circuit
- usb to 232 circuit