最后一次优化和调整代码,增加支持keil4的中文注释。

This commit is contained in:
Andy0613
2026-07-07 09:27:09 +08:00
parent fd4305cfbe
commit 7df28fc634
16 changed files with 5352 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
/******************************************************************************
* 文件名:temp.h
* 功能:DS18B20 温度传感器驱动头文件
* 硬件接口:P3^7(单总线数据线)
* 编译器:Keil C51
******************************************************************************/
#ifndef __TEMP_H_
#define __TEMP_H_
#include<reg51.h>
/* DS18B20 单总线数据引脚定义 */
sbit DSPORT=P3^7;
/* DS18B20 基本操作函数 */
unsigned char Ds18b20Init(void); /* 初始化 DS18B20,返回 1=存在 0=不存在 */
void Ds18b20WriteByte(unsigned char dat); /* 向 DS18B20 写入一个字节 */
unsigned char Ds18b20ReadByte(void); /* 从 DS18B20 读取一个字节 */
#endif