the only thing i'm wondering about (in hope to speed up the sensor read time) is why the DS18B20 has to wait a full second when pulling the bus high after the 0x44 command and then why you need to do a reset followed by a 0xCC BEFORE you send the read command 0xBE. can anyone explain this?
Actually, you only need to wait a maximum of 750-milliseconds for
the 18B20 to perform the digitization of the current temperature.
This is the maximum time needed for all 12-bits of precision *BUT*
if you can get by with 9-bit precision (+/- 0.5 degree C and I don't
see why you couldn't) then the wait is at most 93.75-milliseconds.
These numbers come from the 18B20 spec sheet. Keep in mind
that you need to tell the 18B20 that you want only 9-bits of precision
by appropriately setting its configuration register in the scratchpad.
Why do you need to issue a 0xCC after the reset but before the 0xBE?
After a 1-wire bus reset all attached devices are listening to hear which
one gets selected with a SELECT command (0x55). This presumes
multilple devices on the bus and will determine which of the devices on
the bus the ReadScratchPad command (0xBE) will apply to so you can
read the temperature. Since you've only got one sensor on each pin you
don't need to select which sensor to read so the SkipROM command
(0xCC) is issued to tell the lone sensor that the next set of commands
are for you. If you don't do this your 18B20 will merrily sit there waiting
to be selected.