18b20.c

来自「数字温度传感器ds18b20+at8051的完整代码」· C语言 代码 · 共 27 行

C
27
字号
#include <AT89X51.H>
#include "PCCOM.H"
#include "18B20.h"
//----------main----------------------------
void main(void)
{	unsigned int i;
	//float Tdata;
	Init_Pccom();

	printf("this is the test of 18B20!\n");
	printf("now reset\n");
	printf("reset ok!\n");
	printf("read the temperature:\n");
	printf("the T is:\n");

	for(i=0;i<300;i++)
	{
			/*Tdata=ReadTemperature();printf("%f\n",Tdata);*/
		disp_18b20_pccom();
		printf("\n");
		delay_temp(40000);
	}

	for(;;);
}		
	

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?