Multiple DS18B20 on one input pin

Christian177

New Member
Hi all,

I am completely new to PicAxe and to this forum, so my problem may sound a bit silly to you!

I have started with a 08A and want to connect digital temp sensor DS18B20. No problem reading the individual code of the sensor using readowsn, also no problem reading the temperature of the device using either readtemp or readtemp12.
Now I'd like to connect multiple 18B20 to the same input. How can I address each of them one by one and read their temperature value? Is this possible, and if so how do I program this?
I have all other PicAxe chips as well, so no problem if I need to upgrade to a bigger one to solve this problem.

Many thanks for help!:)

Chris
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE Forum.

You can only read multiple DS18B20 temperatures on a single signal line by using the OWIN and OWOUT commands so you will need to use an X1 or X2 PICAXE.
 

hippy

Ex-Staff (retired)
rmeldo's post #4 looks to be what we have tried and tested and have shown to work.

It is also possible to issue One-Wire commands to initiate temperature readings for each DS18B20 in turn, delay a single 750ms, then read the results back in turn. This minimises the delay between readings, it also means the program can continue doing whatever it needs to do with no delays, reading the results 750ms or longer later.
 

Christian177

New Member
Hi all,

many thanks for your good advice. I have looked at all the responses and threads and will try a few things next, first of all the owin and owout commands.
Oh yes, and 08A was in fact a typo! I meant to say 08M!

Again many thanks!

Chris
 
Top