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 端口
/*--------------------