76 R_CLK = 1;
77 R_CLK = 0;
78 }
The array.h header file is as follows:
//Dot matrix display array
//For line scanning
unsigned char code tab0[] = {0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80,
0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00};
//Total destruction
unsigned char code tab8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
// I
unsigned char code tab1[] = {96,2,28,10,16,18,16,2,254,63,16,2,16,18,112,18,24,10,22,10,16,36,16,42,16,49,156,32,0,0,0,0};
// Call
unsigned char code tab2[] = {0,16,0,16,158,16,146,16,146,16,146,16,146,24,146,22,146,17,158,16,18,16,0,16,0,16,0,16,0,0,0,0};
// Do
unsigned char code tab3[] ={80,2,80,2,72,2,232,62,76,17,74,18,232,18,168,18,168,10,168,10,168,4,232,10,40,17,136,32,0,0,0,0};
// big
unsigned char code tab4[] = {128,0,128,0,128,0,128,0,254,63,128,0,64,1,64,1,64,1,32,2,32,2,16,4,8,8,6,48,0,0,0,0};
// Hee
unsigned char code tab5[] ={252,62,36,34,36,34,244,34,148,62,148,2,244,2,36,34,36,34,252,60,0,0,36,17,68,34,66,34,0,0,0,0};
// Hee
unsigned char code tab6[] ={252,62,36,34,36,34,244,34,148,62,148,2,244,2,36,34,36,34,252,60,0,0,36,17,68,34,66,34,0,0,0,0};
//Total destruction
unsigned char code tab7[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
In the main function, *(p[0] + 2*(k+j) + 1) is P[0][2(k+j)+1], and *(p[0] + 2*(k+j)) is P[0][2(k+j)], which is the 0th row of the P array.
Let's first look at how to display Chinese characters vertically. Vertical movement can be understood as an infinitely large dot matrix at the beginning for you to put the content you want. Suppose you put it in at the beginning. But at the beginning, only one Chinese character is displayed, and then after a period of time, the whole thing moves up one line and then another image is displayed. This cycle repeats until the whole thing is displayed.
It is through this principle that longitudinal movement is achieved.
As for how to judge the value of j, this is how I understand it:
"My name is Da Xixi" has a total of six characters, and adding the first and last "quanmie", the total is 8*32 bits.
Therefore, the maximum value of the entire array is P[0][255] (according to the location pointed to, P[0][32] is P[1][0]).
So when j is 7*16, the maximum value of the array is P[0][255]. The last bit is not read, but the value stored in the array itself is 0. After inversion, it is 1. If it is listed as a high level, it will be off even if it is not read.
On the contrary, if we take 8*16, the maximum value of the array is P[0][287]. Because the array has not been initialized, we don't know what the corresponding address will be. So it may cause some places to be bright, affecting the final effect.
In short, the closer the final judgment value is to the actual array size, the better.
This is just my personal opinion. My analysis is not very professional, but I hope you can understand it. Haha.
Conclusion: For vertical movement, the row scanning method is used, and the displayed information is placed in columns. For horizontal movement, the column scanning method is used, and the displayed information is placed in rows.
I won’t go into detail here because they are all pretty much the same.
Previous article:C51 MCU Learning - 8×8LED dot matrix screen learning notes
Next article:Teach you to learn 51 single chip microcomputer step by step: variable advanced and dot matrix LED
Recommended ReadingLatest update time:2024-11-15 09:00
- Popular Resources
- Popular amplifiers
- 【Follow me Season 2 Episode 2】Arduion UR4 homework submission code
- Sensor Principle and Application Circuit Design (Edited by Chen Shuwang, Song Lijun, Xu Yunfeng)
- Detailed explanation of big data technology system: principles, architecture and practice (Dong Xicheng)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Lead Angle/Conduction Angle of Brushless DC Motor
- FIR filter design based on FPGA (source code download attached)
- The timing relationship between voltage and current lead and lag
- NE555 Internal Structure
- [Application development based on NUCLEO-F746ZG motor] 8. Program framework - Introduction to the three core tasks
- PADS Packaging
- MSP430 development and programming environment construction
- "Playing with the board" + Yu Zhennan's STM32 development board experiment 1
- What is the difference between connecting the capacitor to the ground hole and not to the ground hole in the power circuit?
- TWS headset hardware design