My last results is that I use this code, where delay_us is function for microseconds:
float DS18B20_GetTemp(void)
{
uint8_t temp_l, temp_h;
int16_t temp;
//if (!DS18B20_Start()) return -1000; // Error
//DS18B20_WriteByte(0xCC); // Skip ROM
//DS18B20_WriteByte(0x44); // Convert T
HAL_Delay(750); // Wait for conversion
DS18B20_Start();
DS18B20_WriteByte(0xCC); // Skip ROM
// DS18B20_WriteByte(0xBE); // Read Scratchpad
// temp_l = DS18B20_ReadByte();
// temp_h = DS18B20_ReadByte();
// temp = (temp_h << 8) | temp_l;
return (float)temp / 16.0;
}
615 us is reset pulse and 125 presence. This timing across the normal range as I expect:
But when we talk about writing bits, I got minimum 32us where I plan to have a <= 15us:
Up to now I didn't find any way to set it properly... I told with some DIY guys, they said that there is no way to expect from Proteus this accuracy