Exemple #1
0
/***** start ds18b20 temp convert *************/
void DS1B20CT(){
	DS18B20Init();
	delay1xus(5);
	DS18B20WritCmd(0xCC);
	DS18B20WritCmd(0x1F);
	DS18B20Init();
	delay1xus(5);
	DS18B20WritCmd(0xCC);
	DS18B20WritCmd(0x44);
}
Exemple #2
0
/*********************************************************************************************************
** 函数名称:  InitAllIRQ
** 函数功能:  对所有需要的中断进行初始化
** 入口参数:  无
** 出口参数:  无
** 函数说明:
*********************************************************************************************************/
void InitAllIRQ(void)
{
/********************************
* 在此处添加中断初始化调用
*********************************/
//	uint8 status;
	Time0Init();	//定时器 

	I2C1Init(I2C_CLK_100K);	//I2C,默认速度100
	I2C2Init(I2C_CLK_100K);	//I2C,默认速度100
	          
#ifndef	__UCOS				
	PCF8563Init();			//UCOS下在时间任务中初始化
//	KeyboardInit();			//键盘任务中初始化
#endif										   
	StorageInit();
	LCDInit();
	DS18B20Init();
}
Exemple #3
0
/***** start ds18b20 temp Read *************/
void DS1B20ReadCmd(){
	DS18B20Init();
	delay1xus(5);
	DS18B20WritCmd(0xCC);
	DS18B20WritCmd(0xBE);
}