Ds18b20

cactusface

Senior Member
Hi Westaust55,
Thanks for your reply regarding the DS18B20, must admit I don't know a lot about this device (must download the data sheet). But understand that it's a 1 wire interface device, so I assumed? that it needed to be driven in a bit banging style, but if the Picaxe has a readtemp function then perhaps its a lot easier?? is this a 1c2 bus? But then I will need an LCD to display my results on, There's always something to do, with these pics.
Regards
Cactusface
 

BeanieBots

Moderator
The DS18B20 uses the "Dallas One Wire" bus.
It is completely different to the I2C bus.

PICAXE supports ReadTemp which will read the temperature to the nearest degree.
It also supports ReadTemp12 which reads the raw 12-bit temperature data to the nearest 1/16 of a degree.

If you are feeling brave, the X2 PICAXEs also support owin/owout commands which allow you to send/receive commands directly over the one wire bus but they are not for the faint hearted. A good read of the Dallas Datasheet for the DS18B20 will show you why!
 

westaust55

Moderator
Cactus,

as I mentioned in your other thread,
All currently available PICAXE (08M, 14M, 20M, X, X1 and X2 parts) have the readtemp command for DS18B20, and thus they are easy to use.
What is the bit banging for?
Beaniebots has answered most of your added question.


The one-wire commands OWIN and OWOUT are also available on the X1 parts (not just the X2 parts)

The readtemp and readtemp12 commands are able to be used on any "normal" PICAXE input pin.
 
Top