HD7279(c语言)驱动程序含有两个按键驱动程序
来源:百度文库 编辑:神马文学网 时间:2024/04/25 23:15:21
〖说明〗标准8段数码管驱动程序不用使用者更改另外送多个时序函数,还有赠送按键扫描及两键驱动程序,全中文提示使用更方便快捷 http://www.mcuzb.com 坐标网时时更新为您的工作带来方便。
默认11.0592Mhz的晶振。
—————————————————————*/
#include
/*--------------------------------------------
调用方式:自行I/O 口定义﹫2001/05/12
函数说明:私有函数,各接口定义
--------------------------------------------*/
sbit HD7279_CS=P1^4; // HD7279_CS--P1.4
sbit HD7279_CLK=P1^5; // HD7279_CLK-- P1.5
sbit HD7279_DATA=P1^6; // HD7279_DATA-- P1.2
sbit HD7279_KEY =P1^7; // HD7279_KEY-- P1.3
/*--------------------------------------------
调用方式: HD7279A 各指令定义﹫2001/05/12
函数说明:私有函数,接口定义
--------------------------------------------*
/#define HD7279_RESET 0xa4 //复位
#define HD7279_TEST 0xbf //测试
#define HD7279_RLC 0xa3 //循环左移
#define HD7279_RRC 0xa2 //循环右移
#define HD7279_RL 0xa1 //左移
#define HD7279_RR 0xa0 //右移
#define HD7279_DECODE0 0x80 //译码方式0
#define HD7279_DECODE1 0xc8 //译码方式1
#define HD7279_UNDECODE 0x90 //译码方式2: 不译码
#define HD7279_HIDE 0x98 //消隐
#define HD7279_FLASH 0x88 //闪烁
#define HD7279_SEGON 0xe0 //段亮
#define HD7279_SEGOFF 0xc0 //段灭
#define HD7279_READ 0x15 //读
/*--------------------------------------------
调用方式: void HD7279_LongDelay(void) 等侍函数﹫2001/05/12
函数说明 私有函数,>500ms
--------------------------------------------*/
void HD7279_LongDelay(void)
{
unsigned char i;
for (i=0;i<6;i++);
}
/*--------------------------------------------
调用方式:void HD7279_ShortDelay(void) 等侍函数﹫2001/05/12
函数说明:私有函数,=500ms
--------------------------------------------*
/void HD7279_ShortDelay(void)
{;}
/*--------------------------------------------
调用方式:void Delay10ms(unsigned char time) 等侍函数﹫2001/05/12
函数说明:私有函数, 6M晶振
--------------------------------------------*/
void Delay10ms(unsigned char time)
{
unsigned char i;
unsigned int j;
for(i=0;i
默认11.0592Mhz的晶振。
—————————————————————*/
#include
/*--------------------------------------------
调用方式:自行I/O 口定义﹫2001/05/12
函数说明:私有函数,各接口定义
--------------------------------------------*/
sbit HD7279_CS=P1^4; // HD7279_CS--P1.4
sbit HD7279_CLK=P1^5; // HD7279_CLK-- P1.5
sbit HD7279_DATA=P1^6; // HD7279_DATA-- P1.2
sbit HD7279_KEY =P1^7; // HD7279_KEY-- P1.3
/*--------------------------------------------
调用方式: HD7279A 各指令定义﹫2001/05/12
函数说明:私有函数,接口定义
--------------------------------------------*
/#define HD7279_RESET 0xa4 //复位
#define HD7279_TEST 0xbf //测试
#define HD7279_RLC 0xa3 //循环左移
#define HD7279_RRC 0xa2 //循环右移
#define HD7279_RL 0xa1 //左移
#define HD7279_RR 0xa0 //右移
#define HD7279_DECODE0 0x80 //译码方式0
#define HD7279_DECODE1 0xc8 //译码方式1
#define HD7279_UNDECODE 0x90 //译码方式2: 不译码
#define HD7279_HIDE 0x98 //消隐
#define HD7279_FLASH 0x88 //闪烁
#define HD7279_SEGON 0xe0 //段亮
#define HD7279_SEGOFF 0xc0 //段灭
#define HD7279_READ 0x15 //读
/*--------------------------------------------
调用方式: void HD7279_LongDelay(void) 等侍函数﹫2001/05/12
函数说明 私有函数,>500ms
--------------------------------------------*/
void HD7279_LongDelay(void)
{
unsigned char i;
for (i=0;i<6;i++);
}
/*--------------------------------------------
调用方式:void HD7279_ShortDelay(void) 等侍函数﹫2001/05/12
函数说明:私有函数,=500ms
--------------------------------------------*
/void HD7279_ShortDelay(void)
{;}
/*--------------------------------------------
调用方式:void Delay10ms(unsigned char time) 等侍函数﹫2001/05/12
函数说明:私有函数, 6M晶振
--------------------------------------------*/
void Delay10ms(unsigned char time)
{
unsigned char i;
unsigned int j;
for(i=0;i
HD7279(c语言)驱动程序含有两个按键驱动程序
驱动程序
Linux网卡驱动程序编写
Linux驱动程序编写
揭密JDBC驱动程序
电脑驱动程序全面应用
驱动程序恢复办法
驱动程序是做什么的
windows7 驱动程序安装
Linux 设备驱动程序(转载)
USB驱动程序笔记
Linux驱动程序开发2
精确查找摄像头驱动程序
驱动程序安装方法大全
编译scull的驱动程序
电脑驱动程序小常识
[全能]富士a175驱动程序[最好]富士a175驱动程序
如何编写 Linux 设备驱动程序
Linux设备驱动程序设计实例
一步步设计自己的驱动程序
设备驱动程序安装及注意事项
SD卡SPI模式驱动程序!!
驱动程序的备份与恢复
设备驱动程序安装及注意事项