[51 MCU Study Notes FOUR]---16*16LED dot matrix

Publisher:WanderlustGlowLatest update time:2020-06-17 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

[1] [2] [3]
Reference address:[51 MCU Study Notes FOUR]---16*16LED dot matrix

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

CRC16 - Cyclic Redundancy Check
Realize data transmission and control through CRC-16 cyclic redundancy check, such as controlling LED lights, buzzers, and sending data to the host computer.      Because it is data transmission and control, a structure and common body need to be customized to facilitate data identification and enhance readability. F
[Microcontroller]
ATmega 16 MCU TWI interface related registers (VI)
1.TWBR——TWI bit rate register TWBR is the bit rate generator division factor. The bit rate generator is a divider that generates the SCL clock frequency in master mode. When TWI works in slave mode, there is no need to set the bit rate register or pre-division factor, but the slave's CPU frequency must be greater than
[Microcontroller]
Huawei nova lite 3+ released in Japan: priced at 1,600 yuan, supports GMS
      On May 29, Huawei's new model nova lite 3+ was officially launched in Japan. The 4+128GB version is priced at 24,800 yen, or about 1,600 yuan.   Huawei nova lite 3+ is the successor model of last year's nova lite 3. It is equipped with a 6.21-inch water drop screen with a screen-to-body ratio of 89% and a resolu
[Mobile phone portable]
Meizu 16T may be out: the last 4G phone
       On June 11, a Meizu user @Meizu Technology asked, "Why is the Meizu 16T not in stock? I need this cost-effective version."   Wan Zhiqiang, head of marketing at Meizu Technology, said that the 5G network is being deployed very quickly. Taking Zhuhai as an example, it is said that full coverage will be basically
[Mobile phone portable]
Meizu 16T may be out: the last 4G phone
AVR microcontroller (ATMEGA16) matrix keyboard scanning program
Program ideas and defects reference: 51 single chip microcomputer (AT89C52) matrix keyboard detection program #include iom16v.h   typedef unsigned char uchar;   typedef unsigned int uint;   #define dula_h  PORTD|=0x01   #define dula_l  PORTD&=0xfe   #define wela_h  PORTD|=0x02   #define wela_l  PORTD&=0xfd   #define
[Microcontroller]
AVR microcontroller (ATMEGA16) matrix keyboard scanning program
Single chip microcomputer (51) Circular flow of numbers "16617200230"
#include regx51.h unsigned char code number ={0x06,0x7d,0x7d,0x06,0x07,0x5b,0x3f,0x3f,0x5b,0x4f,0x3f,0x06,0x7d,0x7d,0x06,0x07,0x5b,0x3f,0x3f,0x5b,0x4f,0x3f}; unsigned char code com = {0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};   void delay_ms(unsigned char i){ unsigned char n=0; while(i--){ for(n=0;n 123;n++);
[Microcontroller]
Production of Gas Detector Based on PIC16F84A GH-312 Sensor
Introduction   This is a gas detection circuit capable of detecting many different types of gases. The sensor used is the GH-312, from the datasheet, it is capable of sensing gases such as smoke, LPG, butane and propane, methane, alcohol, hydrogen, etc.        Schematic diagram        Parts List
[Analog Electronics]
Production of Gas Detector Based on PIC16F84A GH-312 Sensor
89c52 MCU + HT1621 LCD driver
The microcontroller source program is as follows: #ifndef  _HT1621B_H_ #define  _HT1621B_H_ #include reg52.h #include intrins.h //In order to use NOP #define NOP _nop_() #define uchar unsigned char #define uint unsigned int #define ComMode 0x52  //4COM,1/3bias 1000 010 1001 0 #define RCosc 0x30 //Internal RC oscillat
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号