qyhf.net
当前位置:首页 >> 求程序用AT89C51单片机......用六位数码管实现数字时钟,显示时分秒,用两个按键可分别调整时... >>

求程序用AT89C51单片机......用六位数码管实现数字时钟,显示时分秒,用两个按键可分别调整时...

#include<reg52.h>#define uint unsigned int#define uchar unsigned char uchar temp,aa,miao,fen,shi; sbit m=P3^0; sbit n=P3^1; uchar code table[]={ //数码管编码表0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; void display(uchar miao,uchar

#include unsigned char data dis_digit; unsigned char key_s, key_v; unsigned char code dis_code[11]={ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0xff};//0,1,2,3,4,5,6,7,8,9,关显示,数码管码表 unsigned char data dis_buf[8]; unsigned

一个四联共阴再加一个二联共阴数码管,可以用六片595级联静态显示,也可以动态刷新(频率>60Hz)

电子时钟程序 SECOND EQU 30H MINITE EQU 31H HOUR EQU 32H HOURK BIT P0.0 MINITEK BIT P0.1 SECONDK BIT P0.2 DISPBUF EQU 40H DISPBIT EQU 48H T2SCNTA EQU 49H T2SCNTB EQU 4AH TEMP EQU 4BH ORG 00H LJMP

#include <reg52.h>#include <intrins.h>#define uchar unsigned char#define uint unsigned int sbit ds1302_RST =P2^0; sbit ds1302_IO =P2^1; sbit ds1302_SCLK=P2^2; sbit ACC0=ACC^0; sbit ACC7=ACC^7; sbit A1=P3^0; sbit A2=P3^1; sbit A3

可以啊,就显示1234吗??

汇编可以么 LED_1 EQU 30H LED_2 EQU 31H LED_3 EQU 32H LED_4 EQU 33H LED_5 EQU 34H LED_6 EQU 35H LED_7 EQU 36H LED_8 EQU 37H TIMER EQU 38H MODE EQU 39H ;模式判断 FLASH EQU 40H ;闪烁判断 1亮 0不亮

这个课题网上大把,能找得到,最好还是自己动动手编写编写练习,对以后的工作还是有好处的.实在是找不到你再来找我好吗?

直接#include <reg51.h> 这就可以了 不要用52的,不然内存溢出或程序代码过大编译器就不会报错了

相关文档
网站首页 | 网站地图
All rights reserved Powered by www.qyhf.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com