I got a DS18B20 OneWire Tempsensor for my Mega ADK board today.
I saw that it needs a 4k7 resistor pull-up on the data line. However, since there's internal pull-up resistors that can be used, I initialized the IO-pin 2 as INPUT_PULLUP, rather than just INPUT.
It didn't work though.
When I added the 4k7 resistor it worked fine.
How come the internal pull-up didn't work instead of the 4k7 external pull-up. The IO-pin is said to have a very high open impedance, so even if the pullup-resistor is of a higher value, it should still work fine, right?
How come the internal pull-up didn't work instead of the 4k7 external pull-up. The IO-pin is said to have a very high open impedance, so even if the pullup-resistor is of a higher value, it should still work fine, right?
That depends on how you feed the sensor. In parasite mode it won't work with the internal pull-up as the current delivered is to low. If you bring three wires to the sensor (so not using parasite mode) it probably works.