/******************************************************************************/
/* Name: LCD12864(St7920/St7921)+超声波测距模块+STC89C52 */
/* HC-SR04 超声波测距模块 DEMO 程序 */
/* 晶振:11.0592M */
/* Designed by : Tvrostar Date:2007/09/16 */
/* 程序编写:文轩电子 QQ: 517535000 */
/* taobao店铺:http://shop58246706.taobao.com */
/* 接线:模块TRIG接 P1.2 ECH0 接P1.1 */
/* RS(CS) 接 P3.3; */
/* RW(SID) 接 P3.4; */
/* E(SCLK) 接 P3.5; */
/* PSB 接 GND 串行模式 */
/******************************************************************************/
#include <AT89X51.H>
#include <intrins.h>
//引脚定义
sbit RX = P1 ^ 1;
sbit TX = P1 ^ 2;
sbit CS = P3 ^ 3; //片选 高电平有效 单片LCD使用时可固定高电平
sbit SID = P3 ^ 4; //数据
sbit SCLK = P3 ^ 5; //时钟
//Function Definition 函数声明
void Delay(int num);
void Init_DS18B20(void);
unsigned char ReadOneChar(void);
void WriteOneChar(unsigned char dat);
unsigned int ReadTemperature(void);
void clock_out(unsigned char dd);
unsigned char clock_in(void);
unsigned char read_clock(unsigned char ord);
void write_clock(unsigned char ord, unsigned char dd);
void Disp(void);
void id_case1_key(void);
void id_case2_key(void);
void Set_time(unsigned char sel,bit sel_1);
void Timer0_Init(void);
void Init_1302(void);
void Set_Bell(unsigned char sel, bit sel_1);
void Bell(void);
//12864
void Write_char(bit start, unsigned char ddata);
void Send_byte(unsigned char bbyte);
void Delaynms(unsigned int di);
void Lcd_init(void);
void Disp_img(unsigned char *img);
void LCD_Write_string(unsigned char X,unsigned char Y,unsigned char *s);
void LCD_set_xy( unsigned char x, unsigned char y );
unsigned char code num[]={"0123456789 :.-"};
unsigned char code waves[]={"超声波测距系统"};
unsigned char code znwk[] ={"智能微控工作室"};
unsigned char code CM[] = {"M"};
unsigned int time=0;
long S=0;
bit flag =0;
unsigned char disbuff[4] ={ 0,0,0,0,};
unsigned char code logo[]={
/*-- 调入了一幅图像:logo.bmp -- */
/*-- 宽度x高度=128x64 欢迎使用本产品LOGO --*/
/*-- 调入了一幅图像:C:\Documents and Settings\lwd\桌面\新建文件夹\X.bmp --*/
/*-- 宽度x高度=128x64 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xE0,0x00,0x00,0x0C,0x00,0x00,0x40,0x70,0x00,0x00,0x00,0x80,0x00,
0x00,0x00,0x00,0xE0,0x00,0x00,0x1E,0x00,0x00,0x60,0x70,0x00,0x00,0x0F,0xE0,0x00,
0x00,0x00,0x01,0xC0,0x00,0x60,0x3C,0x00,0x00,0xE0,0x60,0x00,0x1F,0xFF,0xE0,0x00,
0x00,0x00,0x03,0x80,0x00,0x70,0x70,0x40,0x00,0xE0,0x7E,0x00,0x1F,0xE0,0xC0,0x00,
0x00,0x00,0x03,0x00,0x00,0x73,0xC3,0xF0,0x01,0xC3,0xFC,0x00,0x38,0xE1,0xC0,0x00,
0x00,0x03,0xC6,0x3C,0x00,0x33,0x9F,0xF0,0x03,0x8F,0xC0,0x00,0x30,0xC1,0xC0,0x00,
0x00,0x3F,0xEF,0xFE,0x00,0x03,0x1C,0xE0,0x07,0x01,0xCC,0x00,0x31,0xF1,0x80,0x00,
0x00,0x79,0xDF,0xBC,0x00,0x06,0x18,0xC0,0x0E,0x01,0xFE,0x00,0x77,0xF9,0x80,0x00,
0x00,0x01,0xB0,0x30,0x01,0xC6,0x19,0xC0,0x1E,0x7F,0xDE,0x00,0x6F,0x83,0x80,0x00,
0x00,0x23,0xAC,0x60,0x0F,0xE6,0xF1,0x80,0x3E,0x7B,0x38,0x00,0x61,0x83,0x00,0x00,
0x00,0x37,0x0E,0x00,0x0F,0xC7,0xB7,0x80,0xEC,0x63,0x30,0x00,0xE3,0x03,0x00,0x00,
0x00,0x3E,0x0E,0x00,0x01,0x8F,0x37,0x01,0xCC,0x6F,0xF0,0x00,0xC7,0xF7,0x00,0x00,
0x00,0x1E,0x0C,0x00,0x03,0x1E,0x66,0x03,0x0C,0x7F,0x00,0x01,0xFF,0xE6,0x00,0x00,
0x00,0x1E,0x1C,0x00,0x03,0x1C,0x60,0x02,0x19,0xAC,0x00,0x01,0x96,0x06,0x00,0x00,
0x00,0x3E,0x3E,0x00,0x03,0x18,0x60,0x00,0x19,0xFC,0x00,0x03,0x86,0x0E,0x00,0x00,
0x00,0x7E,0x36,0x00,0x03,0x00,0xC0,0x00,0x38,0x78,0x00,0x03,0x06,0x0C,0x00,0x00,
0x00,0xE6,0x67,0x00,0x03,0x00,0xC0,0x00,0x30,0x78,0x00,0x06,0x0C,0x0C,0x00,0x00,
0x01,0xC6,0xC3,0x80,0x7F,0xF0,0xC0,0x00,0x30,0xFE,0x00,0x0E,0x0C,0x1C,0x00,0x00,
0x03,0x81,0x83,0xC0,0x78,0xFF,0x80,0x00,0x61,0xCF,0x80,0x1C,0x08,0x18,0x00,0x00,
0x06,0x07,0x03,0xE0,0x00,0x1F,0xFF,0xE0,0x67,0x07,0xE0,0x38,0x18,0xF8,0x00,0x00,
0x08,0x0E,0x01,0xF8,0x00,0x07,0xFF,0x80,0xCE,0x03,0xF8,0x60,0x00,0x70,0x00,0x00,
0x00,0x18,0x01,0xF8,0x00,0x01,0xFC,0x00,0xC0,0x01,0xFC,0xC0,0x00,0x70,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x06,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x07,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x06,0x00,0x00,0x00,0x0C,0xE0,0x00,0x01,0xE0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0E,0x00,0x00,0x00,0x3F,0xE0,0x00,0xFF,0xF0,0x00,0x38,0x00,0xE0,0x00,
0x00,0x00,0x0C,0x00,0x00,0x0F,0xFF,0x80,0x00,0xF8,0xF0,0x00,0x38,0x00,0xE0,0x00,
0x00,0x00,0x0C,0xF0,0x00,0x0F,0xC7,0x00,0x00,0x60,0xE0,0x00,0x38,0x00,0xE0,0x00,
0x00,0x00,0x1F,0xF0,0x00,0x01,0x8E,0x00,0x00,0x60,0xC0,0x00,0x70,0x01,0xC0,0x00,
0x00,0x07,0xFF,0x80,0x00,0x01,0x8C,0x00,0x00,0xE1,0x80,0x00,0x70,0x01,0xC0,0x00,
0x00,0x07,0xF8,0x00,0x00,0x01,0x98,0x00,0x00,0xDF,0xC0,0x00,0x70,0x01,0xC0,0x00,
0x00,0x00,0x78,0x00,0x00,0x01,0xBF,0xE0,0x00,0xFF,0x00,0x00,0x60,0x01,0x80,0x00,
0x00,0x00,0xFC,0x00,0x00,0x7F,0xFF,0xE0,0x00,0xC0,0x00,0x00,0xE0,0x03,0x80,0x00,
0x00,0x01,0xFE,0x00,0x00,0x7F,0xF8,0x00,0x00,0x00,0x00,0x00,0xC0,0x03,0x00,0x00,
0x00,0x03,0xB7,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x3C,0x00,0xC0,0x03,0x00,0x00,
0x00,0x07,0x67,0x00,0x00,0x60,0x00,0x00,0x03,0x9F,0xFE,0x00,0x80,0x02,0x00,0x00,
0x00,0x0E,0x63,0x80,0x00,0xE0,0x00,0x01,0xFF,0xCF,0x1E,0x01,0x80,0x06,0x00,0x00,
0x00,0x1C,0xE1,0xE0,0x00,0xC0,0x00,0x00,0xE3,0x9C,0x38,0x01,0x80,0x06,0x00,0x00,
0x00,0x38,0xC1,0xF8,0x01,0xC0,0x00,0x00,0xC3,0x18,0x30,0x00,0x00,0x00,0x00,0x00,
0x00,0xE0,0xFC,0xFE,0x03,0x80,0x00,0x01,0xC7,0x18,0x60,0x00,0x00,0x00,0x00,0x00,
0x01,0xDF,0xF8,0xFE,0x03,0x00,0x00,0x01,0x8E,0x1B,0xE0,0x07,0x00,0x1C,0x00,0x00,
0x07,0x07,0x80,0x00,0x07,0x00,0x00,0x01,0xFF,0x3F,0xE0,0x07,0x00,0x1C,0x00,0x00,
0x0C,0x03,0x80,0x00,0x0E,0x00,0x00,0x01,0xF0,0x38,0x00,0x0F,0x00,0x3C,0x00,0x00,
0x00,0x03,0x00,0x00,0x1C,0x00,0x00,0x01,0x00,0x20,0x00,0x06,0x00,0x18,0x00,0x00,
0x00,0x03,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x03,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x02,0x00,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
/******************************************************************************/
void Lcd_init(void) //初始化LCD
{
Delaynms(10); //启动等待,等LCM讲入工作状态
CS=1;
Write_char(0,0x30
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码)213-超声波测距LCD12864显示(51单片机C语
资源推荐
资源详情
资源评论
收起资源包目录
213-超声波测距LCD12864显示(51单片机C语言实例Proteus仿真和代码).rar (12个子文件)
213-超声波测距LCD12864显示
测距程序.LST 21KB
测距程序.M51 19KB
测距程序_Uv2.Bak 2KB
测距程序.lnp 48B
测距程序.plg 646B
测距程序.C 13KB
测距程序.hex 9KB
测距程序.Uv2 2KB
测距程序.OBJ 19KB
测距程序.Opt 987B
测距程序_Opt.Bak 986B
测距程序 17KB
共 12 条
- 1
资源评论
- xueren32022-11-15资源质量不错,和资源描述一致,内容详细,对我很有用。
- Honor_DIpper2023-05-26总算找到了自己想要的资源,对自己的启发很大,感谢分享~
- 2301_765366872023-04-29这个资源总结的也太全面了吧,内容详实,对我帮助很大。
- 2301_764833302023-12-31资源很受用,资源主总结的很全面,内容与描述一致,解决了我当下的问题。
荣华富贵8
- 粉丝: 213
- 资源: 7653
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C语言-leetcode题解之28-implement-strstr.c
- C语言-leetcode题解之27-remove-element.c
- C语言-leetcode题解之26-remove-duplicates-from-sorted-array.c
- C语言-leetcode题解之24-swap-nodes-in-pairs.c
- C语言-leetcode题解之22-generate-parentheses.c
- C语言-leetcode题解之21-merge-two-sorted-lists.c
- java-leetcode题解之Online Stock Span.java
- java-leetcode题解之Online Majority Element In Subarray.java
- java-leetcode题解之Odd Even Jump.java
- 计算机毕业设计:python+爬虫+cnki网站爬
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功