51proteus simulation: 16x16LED displays a Chinese character

Publisher:郑大大Latest update time:2017-01-10 Source: eefocusKeywords:16x16LED Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

There are billboards everywhere that display Chinese characters on LED displays. The principle is actually very simple. We can use a 51 single-chip microcomputer to control the display of Chinese characters.

As a principle experiment, I only use four 8x8 LEDs to display a Chinese character "欢". If you understand this experiment, it is not difficult to do the scrolling and displaying in turns.

Test environment: proteus,keil

Experiment with virtual components:

4 MATRIX-8x8-RED

1 4-16 decoder: 74HC154

Microcontroller:ATC89C52

Resistor: RESPACK-8, because P0 port is used, so pull-up resistor is required.

Originally, four 74ALS373s were needed to drag the LEDs, but in order to simplify the experiment, four 74ALS373s were omitted in the virtual experiment. Please pay attention to this when doing a physical demonstration.

In addition, use the software "Font Wizard" (search on Baidu) to obtain the font of Chinese characters. A Chinese character has 32 bytes of data, P2 is the high 8 bits, and P0 is the low 8 bits.

Pay attention to the connection of the four LEDs:

The two LEDs above are the upper 8 rows. I used l1-l8.

The lines of the two blocks below are l9--l16.

The columns from right to left are h1--h16.

The principle of rotating display is:

The first time, i=0, row 1, send column data 0x00 (P2), 0x80 (P0), then the 7th bit of P0 in the first row is on;

The second time, i=1, the second row, send column data 0x00, 0x80, then the 7th bit of P0 in the second row is bright;

The third time, i=2, the third row, send column data 0xfc, 0x80, then the third row P2 high 7 bits light up, P0's highest bit lights up;

...and so on, 16 rows of LEDs are lit up one by one.

Adjust the delay time, and you will see all 16 rows of selected LEDs light up, and the Chinese characters will be displayed.

Simulation circuit diagram (click or download to see the enlarged image):

Complete C program:

 

#include


unsigned char code tab0[]={
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
};

  void delay()
  {
  unsigned char i,j;
  for(i=0;i<2;i++)
   for(j=0;j<255;j++);

  }

main()
{
 unsigned char i,j;
 while(1)
 {
   j=0;
   for(i=0;i<=15;i++)
   {
   P1=i;
   P2=tab0[j];
   P0=tab0[++j];
   delay();
   P2=0x00;
   P0=0x00;
   j++;
   }

 }

}


Keywords:16x16LED Reference address:51proteus simulation: 16x16LED displays a Chinese character

Previous article:Keil51 interrupt processing
Next article:51proteus simulation: connection and timing of stepper motor in proteus

Recommended ReadingLatest update time:2024-11-16 20:23

Pro Display XDR wins "Monitor of the Year" award
     The Society for Information Display (SID) today announced the 26th annual display industry award-winning products. Apple's Pro Display XDR won the "Best Display of the Year" award. Pro Display XDR was released last year with the new Mac Pro. It is a 32-inch LCD panel 6K Retina display with more than 20 million pi
[Mobile phone portable]
Pro Display XDR wins
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号