资源简介
采用STC89C51控制的8位并行ADC芯片MAX118驱动程序,总线方式控制,调试成功。
代码片段和文件信息
#include
#include
#include
#define LCD_CW XBYTE[0xFB00]
#define LCD_DW XBYTE[0xFB01]
#define LCD_CR XBYTE[0xFB02]
#define max_118 XBYTE[0x8000] //CS0
#define WHILE_BUSY while(LCD_CR & 0x80)
typedef unsigned int uint;
typedef unsigned char uchar;
/*******powerdown需接高电平*********/
sbit INT=P1^0;
double data_ad dy;
void nint_LCD() //LCD初始化
{
LCD_CW=0x0c;
WHILE_BUSY;
LCD_CW=0x38;
}
void print(uchar *struchar addr)//LCD字符串输出
{
WHILE_BUSY;
LCD_CW = 0x80 | addr;
while(*str!=‘\0‘)
{
WHILE_BUSY;
LCD_DW=*str;
str++;
}
}
void dis_LCD(uchar dateuchar addr)//LCD字符输出
{
WHILE_BUSY;
LCD_CW = 0x80 | addr;
WHILE_BUSY;
LCD_DW = date;
}
void di
- 上一篇:基于数字图像处理的孢子特征提取
- 下一篇:test2_DXF_cc.rar
评论
共有 条评论