温度传感器DS18B20 ISIS仿真

本文档介绍了如何使用keil uVision4进行89C52RC单片机的项目开发,重点关注DS18B20温度传感器的ISIS仿真。项目包含晶振12M,以及标准库intrins.h, reg52.h, stdio.h,自定义的delay.h, 1602.h, 18b20.h头文件,和18b20.c, 1602.c, main.c源代码文件。" 51297230,5647341,Seaborn:Python数据科学中的高级可视化库,"['Python', '数据可视化', 'Seaborn']
摘要由CSDN通过智能技术生成


keil uvsion4文件目录


89c52rc单片机 DS18B20芯片 晶振12M

intrins.h reg52.h stdio.h三个文件是keil自带的

delay.h

#ifndef __DELAY_H__
#define __DELAY_H__
/*------------------------------------------------
 uS延时函数,含有输入参数 unsigned char t,无返回值
 unsigned char 是定义无符号字符变量,其值的范围是
 0~255 这里使用晶振12M,精确延时请使用汇编,大致延时
 长度如下 T=tx2+5 uS 
------------------------------------------------*/
void DelayUs2x(unsigned char t);
/*------------------------------------------------
 mS延时函数,含有输入参数 unsigned char t,无返回值
 unsigned char 是定义无符号字符变量,其值的范围是
 0~255 这里使用晶振12M,精确延时请使用汇编
------------------------------------------------*/
void DelayMs(unsigned char t);

#endif

1602.h

/*-----------------------------------------------
  名称:LCD1602.h
  论坛:www.doflye.net
  编写:shifang
  日期:2009.5
  修改:无
  内容:
  引脚定义如下:1-VSS 2-VDD 3-V0 4-RS 5-R/W 6-E 7-14 DB0-DB7 15-BLA 16-BLK
------------------------------------------------*/
#include<reg52.h> //包含头文件,一般情况不需要改动,头文件包含特殊功能寄存器的定义
#include<intrins.h>

#ifndef __1602_H__
#define __1602_H__


 bit LCD_Check_Busy(void) ;

 void LCD_Write_Com(unsigned char com) ;

 void LCD_Write_Data(unsigned char Data) ;

 void LCD_Clear(void) ;

 void LCD_Write_String(unsigned char x,unsigned char y,unsigned char *s) ;

 void LCD_Write_Char(unsigned char x,unsigned char y,unsigned char Data) ;

 void LCD_Init(void) ;

 void Lcd_User_Chr(void);
   
#endif

18b20.h

#ifndef __DS18B20_H__
#define __DS18B20_H__

#include<reg52.h>     //包含头文件,一般情况不需要改动,头文件包含特殊功能寄存器的定义
#include<intrins.h>

#define uchar unsigned char
#define uint   unsigned int;
/*------------------------------------------------
                    端口定义
------------------------------------------------*/
sbit DQ=P1^3;//ds18b20 端口
/*--------------------
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值