Description: STM32 control temperature sensor u8 DS18B20_Check(void)
{
u8 retry 0
DS18B20_IO_IN() //SET PA0 INPUT
while (DS18B20_DQ_IN&&retry<200)
{
retry++
delay_us(1)
}
if(retry> 200)return 1
else retry 0
while (!DS18B20_DQ_IN&&retry<240)
{
retry++
delay_us(1)
}
if(retry> 240)return 1
return 0
}
To Search:
File list (Check if you may need any files):
SYSTEM\delay\delay.c
......\.....\delay.h
......\sys\sys.c
......\...\sys.h
......\usart\usart.c
......\.....\usart.h
USER\DS18B20.map
....\DS18B20.uvguix.Administrator
....\DS18B20.uvoptx
....\DS18B20.uvprojx
....\JLinkSettings.ini
....\main.c
....\startup_stm32f10x_hd.lst
....\stm32f10x.h
....\stm32f10x_conf.h
....\stm32f10x_it.c
....\stm32f10x_it.h
....\system_stm32f10x.c
....\system_stm32f10x.h
keilkilll.bat
README.TXT
CORE\core_cm3.c
....\core_cm3.h
....\startup_stm32f10x_hd.s
HARDWARE\DS18B20\ds18b20.c
........\.......\ds18b20.h
........\KEY\key.c
........\...\key.h
........\LCD\font.h
........\...\lcd.c
........\...\lcd.h
........\.ED\led.c
........\...\led.h
OBJ\core_cm3.crf
...\core_cm3.d
...\core_cm3.o
...\delay.crf
...\delay.d
...\delay.o
...\DS18B20.axf
...\DS18B20.build_log.htm
...\ds18b20.crf
...\ds18b20.d
...\DS18B20.hex
...\DS18B20.htm
...\DS18B20.lnp
...\ds18b20.o
...\DS18B20.sct
...\DS18B20_DS18B20.dep
...\key.crf
...\key.d
...\key.o
...\lcd.crf
...\lcd.d
...\lcd.o
...\led.crf
...\led.d
...\led.o
...\main.crf
...\main.d
...\main.o
...\misc.crf
...\misc.d
...\misc.o
...\startup_stm32f10x_hd.d
...\startup_stm32f10x_hd.o
...\stm32f10x_fsmc.crf
...\stm32f10x_fsmc.d
...\stm32f10x_fsmc.o
...\stm32f10x_gpio.crf
...\stm32f10x_gpio.d
...\stm32f10x_gpio.o
...\stm32f10x_it.crf
...\stm32f10x_it.d
...\stm32f10x_it.o
...\stm32f10x_rcc.crf
...\stm32f10x_rcc.d
...\stm32f10x_rcc.o
...\stm32f10x_usart.crf
...\stm32f10x_usart.d
...\stm32f10x_usart.o
...\sys.crf
...\sys.d
...\sys.o
...\system_stm32f10x.crf
...\system_stm32f10x.d
...\system_stm32f10x.o
...\usart.crf
...\usart.d
...\usart.o
STM32F10x_FWLib\inc\misc.h
...............\...\stm32f10x_adc.h
...............\...\stm32f10x_bkp.h
...............\...\stm32f10x_can.h
...............\...\stm32f10x_cec.h
...............\...\stm32f10x_crc.h
...............\...\stm32f10x_dac.h
...............\...\stm32f10x_dbgmcu.h
...............\...\stm32f10x_dma.h
...............\...\stm32f10x_exti.h