PropBasic help with DS2760 T/C temp. reader
$WMc%
Posts: 1,884
Hello All:
'
I'm trying to read the serial # and the T/C voltage from a DS2760.
'
I have down loaded the data sheet from Dallas semiconductor, But I see no help here.
'
I started out with the DS2760 using a BS2P40 and the supplied example code from Parallax. It worked great.
'
However I'm having a hard time converting all the special codes that the BS2P's have over to PropBasic.
'
The Doc's are still a little limited for the PropBasic commands, So I'm not sure if I using the OWxxxx commands write.
'
I've added the code below.
'
Thanks in advance for any help or ideas to make this work.
'
I'm trying to read the serial # and the T/C voltage from a DS2760.
'
I have down loaded the data sheet from Dallas semiconductor, But I see no help here.
'
I started out with the DS2760 using a BS2P40 and the supplied example code from Parallax. It worked great.
'
However I'm having a hard time converting all the special codes that the BS2P's have over to PropBasic.
'
The Doc's are still a little limited for the PropBasic commands, So I'm not sure if I using the OWxxxx commands write.
'
I've added the code below.
'
Thanks in advance for any help or ideas to make this work.
Comments
Have you got the 4k7 pullup on the data line? Cannot see it in your diagram... Also that 10k might be a bit high, maybe try nothing or something in the low ohms.
Also if you send more than one byte, remember that the LSB is sent first, so you would do:
OWRESET pin
OWWRITE pin, $CC
OWWRITE pin, $0E69\16
I hope this helps.
Bean
'
MAXWIN:
I changed the series resister from 10K to 220ohm and I added the 4.7K pullup on the D pin.( I missed this part of the DS2760)-Thanks
'
Know I can see some numbers change with the heat of my fingers squeezing the Hot Junc. of the T/C.
'
Bean:
I'm struggling with the OWxxxx commands. Any more ideas?
'
I've modified the code. Its getting closer, But its still not working.
'
Thanks in advance for any help or ideas!
I would stick with byte sized data until you get everything working. Then optimize it, because the byte order can get things out of wack. For example it returns the MSB value first, then the LSB. I think using "value\16" will expect the LSB first. Using two reads avoids the problem.
Also the value returned isn't the temperature. You need to read the cold junction value then run the values through a forumla to get the actual thermocouple temperature.
I have attached my SXB code for ya.
Bean
Thanks Bean
'
I see your point about the LSB-MSB mix-up.I can see this when I try to get the serial # from the DS2760.
'
I'll check-out the SXB code and go from their.
'
Thanks again