I would like to make a simple thermal switch with attiny25 but first I need to read the temperature values from the ds18b20 sensor. I found some codes, here are the sources: DS18B20 lib UART lib
I need to use this uart implementation because the attiny25 does not have. The UART function works well if I send characters but with the temperatures from the sensor it fails. I use the default 1MHz clock speed and 2400 baudrate.
I think the schematic is good, there is the 4,7kOhm pullup, and the data wire is connected. Vdd is 5V.
Could somebody help me please where to find the problem? All of "my" code is here
Here is the onewire communication, is it good?
EDIT1:
Raised clock speed to 8Mhz, here is the 1Wire communication:
And the uart:
_delay_ms(1000) function is actually 0,9813s. Is it possible, that the _delay_us() function is not very accurate so i got wrong timings?
EDIT2:
The reset condition was not enough, but that's not solved the problem.
Output of the onewire communication: