16*16LED dot matrix display Chinese characters C51 program

Publisher:WanderlustGazeLatest update time:2015-07-22 Source: 51heiKeywords:16*16 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The program hardware consists of two 164-control row and two 595-control column chips.
//***************************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! *//
Keywords:16*16 Reference address:16*16LED dot matrix display Chinese characters C51 program

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

Analysis of ATmega128's 16-channel remote control unit circuit
Introduction: The device is connected to the host computer via RS485 ($49.9800) bus. As a remote relay output module, it is used to receive computer instructions and execute remote control or automatic control of the system. There are 16 relay outputs in total. The device has 1600 sets of operation event records and h
[Microcontroller]
Analysis of ATmega128's 16-channel remote control unit circuit
ATmega16 Development Board Tutorial (8) - ADC
9. ADC Before we talk about ADC, let's talk about its cause and effect. Since computers widely use digital electronic technology in automatic control, detection and other fields, and the signals of nature are all analog signals, how to save natural signals through computers? Then we need ADC (Analog-Digital Converter)
[Microcontroller]
ATmega16 Development Board Tutorial (8) - ADC
ATMEGA16 multi-channel AD acquisition
    // Setting ADEN starts the ADC, otherwise the ADC function is turned off. Turning off the ADC during the conversion process will immediately terminate the ongoing conversion. At the same time, clearing ADEN will clear ADIE (AD end interrupt enable). In addition, if ADEN is not cleared in continuous mode,
[Microcontroller]
ATMEGA16 multi-channel AD acquisition
Nanjing CEC Panda 8.5-generation TFT-LCD production line project has a recoverable value of more than 16.5 billion yuan
On June 5, *ST Dongke issued an announcement stating that the company had evaluated the Nanjing CEC Panda 8.5-generation TFT-LCD production line project's asset group in terms of the project's fixed assets, projects under construction, development expenditures, and intangible assets. The results showed that the recove
[Mobile phone portable]
Nanjing CEC Panda 8.5-generation TFT-LCD production line project has a recoverable value of more than 16.5 billion yuan
Write STM8flash and write external flash EN25Q16A-104HIP function
Function to write external flash EN25Q16A-104HIP uint8 program_data(uint16 flash_addr, uint8 buffer , uint8 len) {     uint8 i,flagstatus;     uint16 address;     int8 trycnt=1;     //u16 timeout = 0xFFFF;      retry_lbl:     if(trycnt-- = 0) return(0);     FLASH- CR1 &= (u8)(~0x01);     FLASH- CR1 |= (u8)0x00;
[Microcontroller]
atmega16 on-chip A/D program - CVAVR program
/***************************************************** File name : AD_on chip.c Chip type : ATmega16L Program type : Application Clock frequency : 4.000000 MHz Memory model : Small External SRAM size : 0 Data Stack size : 256 Function : Internal AD conversion, digital tube display *****************************
[Microcontroller]
How to Optimize Circuit Layout for the MAX16974-MAX16976
The MAX16974/MAX16975/MAX16976 converters are standard buck controllers designed for automotive applications. These controllers operate through an internal high-side N-channel field-effect transistor FET and an external freewheeling diode. Proper PCB (printed circuit board) layout, combined with appropriate external c
[Analog Electronics]
How to Optimize Circuit Layout for the MAX16974-MAX16976
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号