AT89C51单片机实验 LED 0-9999循环显示的程序图

来源:百度知道 编辑:UC知道 时间:2024/05/16 13:41:44
急需要程序。。。
要求
0-9999每秒钟显示一个,要按顺序显示下去
急急急急急急急急急急急急急急急 用汇编语言 数码管显示

#include <reg52.h>

#define uchar unsigned char

#define uint unsigned int

uint t1oc=20;   //20*50000us=1s

uint count;

uchar tp[4];

//数码管显示代码

unsigned char code tab[]={

0x3f,0x06,0x5b,0x4f,

0x66,0x6d,0x7d,0x07,

0x7f,0x6f,0x77,0x7c,

0x39,0x5e,0x79,0x71,

0x40,0x80}; 

//0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  16  17  

//0 1 2 3 4 5 6 7 8 9  A  B  C  D  E  F   -   .   

unsigned char code tab_w[]={

0x7F,0xBF,0xDF,0xEF};//位选择代码 从右到左

void delay1ms(unsigned int count)  //延时1ms

{

 unsigned&n