Owin / owout example
MikeS
Posts: 131
Hello,
I have a DS1820 one wire temp sensor and a BS2pe. I tried using the OWIN_OWOUT.BSP example in the Help File of the IDE (v.2.2). I got some strange results on the debug screen when I run the program. In a "room temp" environment I get 3 deg. C and 37 deg.F. When I put my finger on the DS1820 the temp will rise a few degrees so·I know the sensor is responding. The example was written for the DS1822, but from the Maxim data sheets I can not see any differences in the programming.
Any help, advice, or direction will be greatly appreciated.
MikeS
I have a DS1820 one wire temp sensor and a BS2pe. I tried using the OWIN_OWOUT.BSP example in the Help File of the IDE (v.2.2). I got some strange results on the debug screen when I run the program. In a "room temp" environment I get 3 deg. C and 37 deg.F. When I put my finger on the DS1820 the temp will rise a few degrees so·I know the sensor is responding. The example was written for the DS1822, but from the Maxim data sheets I can not see any differences in the programming.
Any help, advice, or direction will be greatly appreciated.
MikeS
Comments
Actually, there is a wee-bit of difference 'tween the 1822 and the 1820. In the 1822
the temperature is returned with 4-bits of fractional degrees C; the 1820 returned only
one bit of fractional degree Celsius. Read those data sheets carefully!!!
Presuming that you've got a REAL 1820 (old as it might be) or an 18S20 the code should
work if you change the following line:
to
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rusty-
--
Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
**Out yonder in the Van Alstyne (TX) Metropolitan Area**
Microsoft is to software what McDonalds is to gourmet cooking
Post Edited (Fe2o3Fish) : 3/6/2006 7:50:15 AM GMT
Thanks for pointing out the "wee bit" of difference between the 1820 and 1822. I changed the code as you suggested and it works fine. I will go back and look at the documentation closer.
Thanks again
Mike
PS
What had me believing that they (DS1820 and DS1822) were %100 compatable was the Help File. It has this title and picture at the top of the page but the code refers to the DS1822.
This program uses a Dallas Semiconductor DS1820 Digital Thermometer device connected as follows. Note that the 4.7 kΩ pull-up resister is required for proper operation.
[img]mk:@MSITStore:C:\Program%20Files\Parallax%20Inc\Stamp%20Editor%20v2.2\PBASIC.chm::/graphics/ds1820_sch.gif[/img]
It took me a little bit last night to figure out what was going on 'cause I thought I had 1820... but the
shift by 4-bits made everything come out right. Er??? I was scratching my head... and I didn't have
a magnifying glass to look at the number printed on the part. <sigh> Anyhoot, I had to look at the
1-wire address inside one of my own programs to see that the family code was 28h, indicating an 18B20,
not 10h which an old 1820 would have. I need to go through my DalSemi parts bin again... after I git
a magnifier.
Well, the 1820 and 1822 are 100% compatible -- at the hardware level.
Glad it's working out for ya!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rusty-
--
Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
**Out yonder in the Van Alstyne (TX) Metropolitan Area**
Microsoft is to software what McDonalds is to gourmet cooking