📄 7279.h
字号:
#include <reg51.h>
#ifndef _7279_
#define _7279_
#define uchar unsigned char
#define uint unsigned int
//****** I/O口定义 ******
sbit DAT = P2^2;
sbit KEY = P2^3;
sbit CS = P2^0;
sbit CLK = P2^1;
//****** HD7279A指令 ******
#define CMD_RESET 0xa4
#define CMD_TEST 0xbf
#define DECODE0 0x80
#define DECODE1 0xc8
#define CMD_READ 0x15
#define UNDECODE 0x90
#define RTL_CYCLE 0xa3
#define RTR_CYCLE 0xa2
#define RTL_UNCYL 0xa1
#define RTR_UNCYL 0xa0
#define ACTCTL 0x98
#define SEGON 0xe0
#define SEGOFF 0xc0
#define BLINKCTL 0x88
//****** 函数定义 ******
//void shortdelay();//8us
//void longdelay();//50us
void send7279(uchar ch);//写入一个字节
//uchar receive7279();//读出一个字节
void write7279(uchar cmd,uchar dta);//写一个命令,一个数据
uchar read7279(uchar cmd);//写一个命令,读出一个数据
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -