Single chip 8x8LED dot matrix screen displays digital

Publisher:Yuexiang666Latest update time:2021-12-10 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Hardware Connection:

program:


#include

#include

#define uchar unsigned char

#define uint unsigned int

uchar code Table_OF_Digits[]=

{

  0x00,0x3e,0x41,0x41,0x41,0x3e,0x00,0x00,

0x00,0x00,0x00,0x21,0x7f,0x01,0x00,0x00,

0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00,

0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x00,

0x00,0x0c,0x14,0x24,0x7f,0x04,0x00,0x00,

0x00,0x72,0x51,0x51,0x51,0x4e,0x00,0x00,

0x00,0x3e,0x49,0x49,0x49,0x26,0x00,0x00,

0x00,0x40,0x40,0x40,0x4f,0x70,0x00,0x00,

0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00,

0x00,0x32,0x49,0x49,0x49,0x3e,0x00,0x00,

};

uchar i=0,t=0,Num_Index = 0;


void main()

{

  P3 = 0x80;

Num_Index = 0;

TMOD = 0x00;

TH0 = (8192-2000)/32;

TL0 = (8192-2000)%32;

TR0 = 1;

IE = 0x82;

while(1);

}


void LED_Screen_Display() interrupt 1

{

  TH0 = (8192-2000)/32;

TL0 = (8192-2000)%32;

P3 = _crol_(P3,1);

P0 = ~Table_OF_Digits[Num_Index * 8 +i];

if(++i == 8) i = 0;

if(++t == 250)

{

t = 0x00;

if(++Num_Index == 10) Num_Index = 0;

}

}

Reference address:Single chip 8x8LED dot matrix screen displays digital

Previous article:Single chip 8x8LED dot matrix screen display pattern
Next article:Design a doorbell using a single chip timer

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号