HAL library 06- DS18B20 for STM32Fxxx

When you have onewire library done, it’s easy to make interface for DS18B20 sensors.


Read more about new HAL libraries


  • Search sensors
  • Read temperature
  • Set resolution for each device from 9 to 12 bits
  • Start temperature conversion on all devices simultaneously
  • Set alarm low and high temperatures
  • Disable alarm temperatures
  • Search devices with alarm flag set


  • HAL
  • TM
    • STM32Fxxx HAL
    • defines.h
    • GPIO
    • DELAY

Functions and enumerations



Project is available on Github, download all libraries below.


Owner of this site. Application engineer, currently employed by STMicroelectronics. Exploring latest technologies and owner of different libraries posted on Github.

You may also like...

Read before commenting!

Before you make a new comment, make sure you agree with things listed below:

  • - Read post to make sure if it is already posted what you are asking for,
  • - Make sure you have the latest version of libraries used in your project,
  • - Make a clean and grammatically correct written message,
  • - Report as many details as possible, including what have you done so far,
  • - Do NOT post any code here. Use Pastebin,
  • - Do NOT post any error codes here. Use Pastebin,
  • - Specify STM32Fxxx family and used Discovery/EVAL/Nucleo or custom made board,
  • - Make sure your clock is set correct for PLL,
  • - If you are using my HAL drivers, please check this post how to start.
Comment will be deleted on breaking these rules without notification!