Problem with serial connection

AllanBertelsen

Senior Member
Before I found PICAXE I bought a QUASAR PROJECT KIT #3145 (QPK). It's a temperature data logger that uses 4 x DS1820. It sends data via serial port.
I want PICAXE to receive these data. QPK reads with higher accuracy. The old DS1820 cannot be read with readtemp12.
Problem is QPK uses DTR and RxD and not RxS and TxD as PICAXE manual 3 describe at page 42-43. How do I connect?
 

AllanBertelsen

Senior Member
Ah – QPK gets its power supply thru DTR. I can see that DTR connects to a 78L05 regulator. So I only have to thing about serin on my PIXACE. RxD goes to my input pin thru a 22k resistor and with a 10K as pull down. I think.
 

Dippy

Moderator
A brief squiz at the circuit suggests its merely using the serial port DTR pin for a (low current) power supply. The rest you'll have to figure out.

P.S. Ah, we crossed. Just goes to show what reading a data sheet does eh?

Edited by - dippy on 09/04/2006 13:18:09
 

AllanBertelsen

Senior Member
Yes – it works!!

This code reads second sensor out of 4. Only thing is that the ascii data has to be converted to centigrade.

<code><pre><font size=2 face='Courier'>
Symbol gdr100 = w6

main:
'Read sensor 2 - there's two leading zeros
serin 1,N2400,(&quot;2 00&quot;),b0, b1, b2, b3, b4
w5 = b0 - 48
w6 = w5 * 1000

w5 = b1 - 48
w5 = w5 * 100
w6 = w6 + w5

w5 = b3 - 48
w5 = w5 * 10
w6 = w6 + w5

w5 = b4 - 48
w6 = w6 + w5

debug gdr100
goto main
</font></pre></code>

The investment in the QPK is then not wasted. And my PICAXE reads 4 temperature sensors with only one pin.

Edited by - AllanBertelsen on 09/04/2006 14:26:57
 
Top