//***************************Author: Undertaker QQ:1205946980*********************// #include#include #define uchar unsigned char #define uint unsigned int code uchar TAB[9][32]={ {0x00,0x80,0x00,0x80,0xFC,0x80,0x05,0xFE, 0x85,0x04,0x4A,0x48,0x28,0x40,0x10,0x40, 0x18,0x40,0x18,0x60,0x24,0xA0,0x24,0x90, 0x41,0x18,0x86,0x0E,0x38,0x04,0x00,0x00 },//joyous {0x40,0x00,0x21,0x80,0x36,0x7C,0x24,0x44, 0x04,0x44,0x04,0x44,0xE4,0x44,0x24,0x44, 0x25,0x44,0x26,0x54,0x24,0x48,0x20,0x40, 0x20,0x40,0x50,0x00,0x8F,0xFE,0x00,0x00}, // Welcome { 0x01,0x00,0x01,0x00,0x3F,0xFC,0x01,0x00, 0x09,0x30,0x05,0x20,0x03,0x40,0x7F,0xFE, 0x01,0x80,0x03,0x40,0x05,0x20,0x09,0x18, 0x31,0x0E,0xC1,0x04,0x01,0x00,0x01,0x00}, // {0x00,0x04,0x7F,0x84,0x08,0x04,0x12,0x24, 0x21,0x24,0x7F,0xA4,0x25,0x24,0x04,0x24, 0x04,0x24,0x7F,0xA4,0x04,0x24,0x04,0x24, 0x05,0x84,0x0E,0x04,0x70,0x14,0x20,0x08,}, // to {0x08,0x20,0x06,0x30,0x04,0x40,0x3F,0xF8, 0x21,0x08,0x3F,0xF8,0x21,0x08,0x21,0x08, 0x3F,0xF8,0x21,0x08,0x01,0x00,0xFF,0xFE, 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00}, // single {0x00,0x40,0x10,0x40,0x10,0x40,0x10,0x44, 0x1F,0xFE,0x10,0x00,0x10,0x00,0x10,0x00, 0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10, 0x20,0x10,0x20,0x10,0x40,0x10,0x80,0x10}, // {0x10,0x00,0x10,0xF8,0x10,0x88,0xFE,0x88, 0x10,0x88,0x10,0x88,0x38,0x88,0x34,0x88, 0x54,0x88,0x50,0x88,0x91,0x08,0x11,0x0A, 0x12,0x0A,0x12,0x0A,0x14,0x06,0x10,0x00}, //machine {0x00,0x00,0x12,0x10,0x12,0x10,0x12,0x10, 0x12,0x10,0xFF,0xFE,0x12,0x10,0x12,0x10, 0x12,0x10,0x13,0xF0,0x12,0x10,0x10,0x00, 0x10,0x08,0x1F,0xFC,0x00,0x00,0x00,0x00},// {0x1F,0xF8,0x11,0x08,0x11,0x08,0x1F,0xF8, 0x11,0x08,0x11,0x08,0x1F,0xF8,0x11,0x88, 0x02,0x40,0x04,0x30,0x1A,0x4E,0x62,0x44, 0x02,0x40,0x04,0x40,0x08,0x40,0x10,0x40,} //Boundary }; void delay(uint z) { uint x,y; for(x=z;x>0;x--) for(y=125;y>0;y--); } //****************************Display program**************************************************// sbit SCK=P3^2; sbit AB =P3^3; sbit ST =P3^5; sbit SH=P3^6; sbit DS=P3^7; uchar m=0,n; void start() { uchar i; uchar j; uchar a; uchar dat; AB=0; for(j=0;j<16;j++) { SCK=0;ST=0; for(a=2;a>0;) {a--; dat=TAB[m][2*j+a]; for(i=0;i<8;i++) { SH=0; if(dat&0x01==0x01) {DS=0;} else {DS=1;} SH=1; dat>>=1; } } P3|=0x24; delay(1); AB=1; } AB=1; SCK=0; SCK=1; SCK=0; } interrupt_hs() interrupt 1 { TL0=(65536-50000)%256; TH0=(65536-50000)/256; n++; if(n==30) { n=0; m++; if(m==9) { m=0; } } } void main() { TMOD=0x01; TL0=(65536-50000)%256; TH0=(65536-50000)/256; ET0=1; EA=1; TR0=1; while(1) { xianshi(); } } //*This program is a 16*16LED dot matrix that alternately displays the above Chinese characters! Focus on understanding the functions and applications of the 595 164 chip and the working principle of the LED dot matrix! This program was independently written by Undertaker! *//
Previous article:Inversion matrix keyboard
Next article:Design of electronic clock based on LCM1602 LCD, DS1302 clock chip and E2PROM
Recommended ReadingLatest update time:2024-11-15 16:25
- Popular Resources
- Popular amplifiers
- Siemens PLC Programming Technology and Application Cases (Edited by Liu Zhenquan, Wang Hanzhi, Yang Kun, etc.)
- Siemens PLC from Beginner to Mastery with Color Illustrations (Yang Rui)
- Siemens PLC Project Tutorial
- Siemens S7-1200-PLC Programming and Application Tutorial (3rd Edition) (Edited by Shi Shouyong)
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
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- How to distinguish diode overcurrent failure and overvoltage failure?
- Protection methods for low-speed interfaces and power circuits (digital audio, analog video, keyboard, etc.)
- Infineon XMC4800 Relax EtherCAT Kit Review Summary
- Analog Discovery 2 Review (5) Acquisition System Hardware Analysis
- Embedded USB driver-free device communication method based on WinUSB
- Power supply obstacle "+comp pin capacitor
- Design and Verification: Verilog HDL
- EEWORLD University - How Semiconductors Change the World
- 【GD32450I-EVAL】+10SD card test
- 3232 Unable to communicate