Ds18b20

Groutie

New Member
Help Please

Can I connect the output of the DS18B20 to any pin OF A PICAXE

ie If I wanted to read value of the temp sensor from PORTc pin 0 on a PICAXE28x1 would I write:

readtemp 11,b1 (11 being pin 11 , portc input0 of the PICAXE) ?

thanks

groutie
 

Texy

Senior Member
Help Please

Can I connect the output of the DS18B20 to any pin OF A PICAXE

ie If I wanted to read value of the temp sensor from PORTc pin 0 on a PICAXE28x1 would I write:

readtemp 11,b1 (11 being pin 11 , portc input0 of the PICAXE) ?

thanks

groutie
Others will correct me if I am wrong, but you cant use port c for this function. You are fairly limited to making port c outputs high or low, ie no pulse function etc. You will need to connect the 18b20 to the set output only ports.

Texy
 

westaust55

Moderator
On a 28X1, port C is the default input port.

For a DSA18B20 connected to physical pin 11, that equates to default input pin 0.

So the command is:

READTEMP 0, b1


or another way:

SYMBOL temp = 0
:
:
READTEMP temp, b1
 

westaust55

Moderator
Not a problem.

For the record and by comparison, for a 40X1, the default input port is port D but within the PICAXE programming, the code will not change.
 
Top