📄 display.h
字号:
#ifdef DisPlay_GLOBALS
#define DisPlay_EXT
#else
#define DisPlay_EXT extern
#endif
//*** 函数定义 ***
DisPlay_EXT void long_delay(void); // 长延时
DisPlay_EXT void short_delay(void); // 短暂延时
DisPlay_EXT void delay10ms(unsigned char); // 延时10MS
DisPlay_EXT void write7279(unsigned char, unsigned char); // 写入到HD7279
DisPlay_EXT void send_byte(unsigned char); // 发送一个字节
DisPlay_EXT unsigned char receive_byte(void); // 接收一个字节
DisPlay_EXT void DisNum(Uchar Bit,Uchar Num); //在指定位显示数字
//*** 变量及I/O口定义 ***
DisPlay_EXT unsigned int tmr;
DisPlay_EXT Uchar Led[8];
sbit cs =P1^4; // cs at P1.4
sbit clk=P1^3; // clk 连接于 P1.5
sbit dat=P1^2; // dat 连接于 P1.2
//****** 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -