基于单片机用数码管显示的电子时钟设计论文

来源:百度知道 编辑:UC知道 时间:2024/05/02 10:01:25
跪求!!

这个很简单的,论文你应该自己写,当然,也可以买别人设计好的。

#include <reg51.h> /*定义头文件*/
/************************************************************************************/
typedef unsigned char BYTE; /*自定义字节类型*/
/************************************************************************************/
#define Set_Bit(BIT) (BIT = 1) /*定义置1函数*/
#define Clear_Bit(BIT) (BIT = 0) /*定义清0函数*/
#define HD7279_TEST 0xbf //测试
#define HD7279_RLC 0xa3 //循环左移
#define HD7279_RRC 0xa2 //循环右移
#define HD7279_RL 0xa1 //左移
#define HD7279_RR 0xa0 //右移
#define DECODE0 0x80 //译码方式0
#define HD7279_DECODE1 0xc8 //译码方式1
#define UNDECODE 0x90 //译码方式2: 不译码
#define HD7279_HIDE 0x98 //消隐
#define HD7279_FLASH 0x88 //闪烁
#define HD7279_SEGON 0xe0 //段亮
#define HD7279_SEGOFF 0xc0 //段灭
#define CMD_READ 0x15 //读

/************************************************************************************/
void Led_O