2026-02-06 2:22 AM
I want to interface STM32G474 MCU with DS18B20 digital temperature probe in my project. The DS18B20 uses one-wire interface. Is one wire interface supported with this MCU?
Kindly provide a detailed explanation. Help please.
Datasheet link for DS1B20: EVVO DS18B20Axx
Regards,
Sreejith
2026-02-06 2:27 AM - edited 2026-02-06 2:32 AM
Hello @sreejithrnair2026 and welcome to the ST community,
The protocol used by this sensor is not supported natively by the MCU. You need to use GPIO and may be a timer to communicate with a such sensor.
2026-02-06 2:30 AM
You can easily implement one-wire with an uart. Uart Feature of G4 like logic inversion, open drain and half duplex mode allows implementation with one pullup.
2026-02-06 2:36 AM
And it seems others already implemented that:
Example: https://github.com/nimaltd/ds18b20/tree/master