Introduction - If you have any usage issues, please Google them yourself
Single-wire digital thermometer DS18B20 Guide, in addition to the hardware structure of introduction, it also contains the source code in assembly language and C language source your code, is a very good development of reference materials.