View Full Version : Program DS1620 as a stand-alone thermostat using BS2
04-20-2007, 03:57 AM
I have a new project where I need to program a DS1620 as a stand-alone thermostat.
The Parallax DS1620 App Note had example code for a BS1, but not a BS2 (unless I missed it).
Other code I've found was in VB6, or was too involved.
Does anyone know where some simple BS2 code, which can be pasted into the BS2's IDE, may be found? All I need to do is program the DS1620's upper and lower set points.
04-20-2007, 04:11 AM
04-20-2007, 06:37 AM
I need help with one last thing. The following piece of code-
' set the upper threshold= +7.5 deg C· shiftout 15,14,lsbfirst,[1,15\9]· ' upper threshold=15/2=7.5 deg CI don't see how one gets the 15/2=7.5 How would I change the code for +26 deg C (80F) and +29 deg C (85F)
04-20-2007, 06:47 AM
There is also some code for a Digital Thermostat I built back in NY. You may find some of the code useful. Tracy actually helped on the C to F conversion.
Parallax Tech Support
04-20-2007, 08:21 AM
The value that is shifted out is in units of 0.5 degrees Celsius. Thus the 15 in...
specifies a threshold of 7.5.
So for thresholds of 26.0 and 29.0 you would use 52 and 58 respectively. Don't forget the \9 for nine bits.
04-20-2007, 08:30 AM
I just happen to be working on the same thing with the same chip.
It lays out a nice easy to understand thermostat with the DS1620. I am having trouble however with displaying the 0.5 decimal part of the DS1620... see my post to follow.
04-20-2007, 09:26 AM
You all were very helpful. Thanks very much. I'm all set now.