need help on DS1624 digital thermometer
Archiver
Posts: 46,084
hi all,
have anyone used the digital thermometer before?
i need help on that.
regards
Ben
have anyone used the digital thermometer before?
i need help on that.
regards
Ben
Comments
Here is a tutorial on the DS1624 by Peter Anderson
http://www.phanderson.com/stamp/tutorial_8.html
An N&V article by Jon Williams' on I2C.
http://www.parallax.com/dl/docs/cols/nv/vol3/col/85.pdf
I think you are using a BS2p, so it has built in I2C commands, and
you should be able to simplify the code a lot.
The DS1620 is a similar chip that has an SPI interface. I have some
info on that here:
http://www.emesystems.com/OL2d1620.htm
-- Tracy
>hi all,
>
>have anyone used the digital thermometer before?
>
>i need help on that.
>
>regards
>Ben
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
i don't really understand the tutorial on the DS1624 by Peter Anderson.
anyway do i need to add resistor or capacitor at any pin?
can i just copy the souce code from the tutorial?
pls guide me.
regards
Ben
Tracy Allen <tracy@e...> wrote:
The DS1624 is an I2C chip.
Here is a tutorial on the DS1624 by Peter Anderson
http://www.phanderson.com/stamp/tutorial_8.html
An N&V article by Jon Williams' on I2C.
http://www.parallax.com/dl/docs/cols/nv/vol3/col/85.pdf
I think you are using a BS2p, so it has built in I2C commands, and
you should be able to simplify the code a lot.
The DS1620 is a similar chip that has an SPI interface. I have some
info on that here:
http://www.emesystems.com/OL2d1620.htm
-- Tracy
>hi all,
>
>have anyone used the digital thermometer before?
>
>i need help on that.
>
>regards
>Ben
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and Body of
the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
[noparse][[/noparse]Non-text portions of this message have been removed]
i found out that for DS1620, i have to connect some resistor and capacitor to
the pins.
l'm not sure if i had to connect anything to the DS1624.
pls advise
regards
Ben
Tracy Allen <tracy@e...> wrote:
The DS1624 is an I2C chip.
Here is a tutorial on the DS1624 by Peter Anderson
http://www.phanderson.com/stamp/tutorial_8.html
An N&V article by Jon Williams' on I2C.
http://www.parallax.com/dl/docs/cols/nv/vol3/col/85.pdf
I think you are using a BS2p, so it has built in I2C commands, and
you should be able to simplify the code a lot.
The DS1620 is a similar chip that has an SPI interface. I have some
info on that here:
http://www.emesystems.com/OL2d1620.htm
-- Tracy
>hi all,
>
>have anyone used the digital thermometer before?
>
>i need help on that.
>
>regards
>Ben
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and Body of
the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
[noparse][[/noparse]Non-text portions of this message have been removed]
These I2C chips need a pullup resistor, around 10 kohms, on the sda
and the scl lines, pulling up to Vdd.
Most of the confusion in the tutorial probably comes from having to
bit-bang the I2C code, which, I agree, can be a lot to chew. You
really have to dig into what it is doing. That is why I recommend you
look Jon William's tutorial too.
If you have a BS2p or BS2pe, it becomes 99.8% easier, because the
Stamp firmware takes care of all the details and does it in a
twinkling of a millisecond. For example, the GOSUB CONFIG command
that is the first step in Prof. Anderson's tutorial becomes,
I2COUT 0,$94,$AC,[noparse][[/noparse]$01]
That one instruction replaces 12 lines of code in the tutorial's
CONFIG subroutine that in turn calls many lines of code in lower
level subroutines.
Then you have the routines to start conversion:
I2COUT 0,$94,[noparse][[/noparse]$EE]
pause 1000 ' <-- delay for conversion to finish-could test status
and to fetch the measurement:
I2COUT 0,$94,[noparse][[/noparse]$AA]
I2CIN 0,$95,[noparse][[/noparse]Hex2 myword]
Don't take my word for it, because I don't have a DS1624 and I have
not tried the code. But that is it for illustration.
By the way, look in the online help for the I2C syntax. Parallax
added an option in the recent releases of the BS2p firmware that
allows an I2C command without an address. The early BS2ps required
an address byte, which made it unsuitable for some of the
instructions above.
-- Tracy
>hi tracy,
>
>i don't really understand the tutorial on the DS1624 by Peter Anderson.
>anyway do i need to add resistor or capacitor at any pin?
>
>can i just copy the souce code from the tutorial?
>
>pls guide me.
>
>regards
>Ben
>
>Tracy Allen <tracy@e...> wrote:
>The DS1624 is an I2C chip.
>Here is a tutorial on the DS1624 by Peter Anderson
>http://www.phanderson.com/stamp/tutorial_8.html
>An N&V article by Jon Williams' on I2C.
>http://www.parallax.com/dl/docs/cols/nv/vol3/col/85.pdf
>
>I think you are using a BS2p, so it has built in I2C commands, and
>you should be able to simplify the code a lot.
>
>The DS1620 is a similar chip that has an SPI interface. I have some
>info on that here:
>http://www.emesystems.com/OL2d1620.htm
>
>-- Tracy
>
>
>
>>hi all,
>>
>>have anyone used the digital thermometer before?
>>
>>i need help on that.
>>
>>regards
> >Ben
>>
>
thanks for the help,
so do u mean that i have to connect a 10Kohms resistor on sda and scl in series?
what do u mean by pulling up to Vdd
Ben
Tracy Allen <tracy@e...> wrote:
Hi Ben,
These I2C chips need a pullup resistor, around 10 kohms, on the sda
and the scl lines, pulling up to Vdd.
Most of the confusion in the tutorial probably comes from having to
bit-bang the I2C code, which, I agree, can be a lot to chew. You
really have to dig into what it is doing. That is why I recommend you
look Jon William's tutorial too.
If you have a BS2p or BS2pe, it becomes 99.8% easier, because the
Stamp firmware takes care of all the details and does it in a
twinkling of a millisecond. For example, the GOSUB CONFIG command
that is the first step in Prof. Anderson's tutorial becomes,
I2COUT 0,$94,$AC,[noparse][[/noparse]$01]
That one instruction replaces 12 lines of code in the tutorial's
CONFIG subroutine that in turn calls many lines of code in lower
level subroutines.
Then you have the routines to start conversion:
I2COUT 0,$94,[noparse][[/noparse]$EE]
pause 1000 ' <-- delay for conversion to finish-could test status
and to fetch the measurement:
I2COUT 0,$94,[noparse][[/noparse]$AA]
I2CIN 0,$95,[noparse][[/noparse]Hex2 myword]
Don't take my word for it, because I don't have a DS1624 and I have
not tried the code. But that is it for illustration.
By the way, look in the online help for the I2C syntax. Parallax
added an option in the recent releases of the BS2p firmware that
allows an I2C command without an address. The early BS2ps required
an address byte, which made it unsuitable for some of the
instructions above.
-- Tracy
>hi tracy,
>
>i don't really understand the tutorial on the DS1624 by Peter Anderson.
>anyway do i need to add resistor or capacitor at any pin?
>
>can i just copy the souce code from the tutorial?
>
>pls guide me.
>
>regards
>Ben
>
>Tracy Allen wrote:
>The DS1624 is an I2C chip.
>Here is a tutorial on the DS1624 by Peter Anderson
>http://www.phanderson.com/stamp/tutorial_8.html
>An N&V article by Jon Williams' on I2C.
>http://www.parallax.com/dl/docs/cols/nv/vol3/col/85.pdf
>
>I think you are using a BS2p, so it has built in I2C commands, and
>you should be able to simplify the code a lot.
>
>The DS1620 is a similar chip that has an SPI interface. I have some
>info on that here:
>http://www.emesystems.com/OL2d1620.htm
>
>-- Tracy
>
>
>
>>hi all,
>>
>>have anyone used the digital thermometer before?
>>
>>i need help on that.
>>
>>regards
> >Ben
>>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and Body of
the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
[noparse][[/noparse]Non-text portions of this message have been removed]
when i run the program, everytime i got a different reading.
what is happening???
regards
Ben
Tracy Allen <tracy@e...> wrote:
Hi Ben,
These I2C chips need a pullup resistor, around 10 kohms, on the sda
and the scl lines, pulling up to Vdd.
Most of the confusion in the tutorial probably comes from having to
bit-bang the I2C code, which, I agree, can be a lot to chew. You
really have to dig into what it is doing. That is why I recommend you
look Jon William's tutorial too.
If you have a BS2p or BS2pe, it becomes 99.8% easier, because the
Stamp firmware takes care of all the details and does it in a
twinkling of a millisecond. For example, the GOSUB CONFIG command
that is the first step in Prof. Anderson's tutorial becomes,
I2COUT 0,$94,$AC,[noparse][[/noparse]$01]
That one instruction replaces 12 lines of code in the tutorial's
CONFIG subroutine that in turn calls many lines of code in lower
level subroutines.
Then you have the routines to start conversion:
I2COUT 0,$94,[noparse][[/noparse]$EE]
pause 1000 ' <-- delay for conversion to finish-could test status
and to fetch the measurement:
I2COUT 0,$94,[noparse][[/noparse]$AA]
I2CIN 0,$95,[noparse][[/noparse]Hex2 myword]
Don't take my word for it, because I don't have a DS1624 and I have
not tried the code. But that is it for illustration.
By the way, look in the online help for the I2C syntax. Parallax
added an option in the recent releases of the BS2p firmware that
allows an I2C command without an address. The early BS2ps required
an address byte, which made it unsuitable for some of the
instructions above.
-- Tracy
>hi tracy,
>
>i don't really understand the tutorial on the DS1624 by Peter Anderson.
>anyway do i need to add resistor or capacitor at any pin?
>
>can i just copy the souce code from the tutorial?
>
>pls guide me.
>
>regards
>Ben
>
>Tracy Allen wrote:
>The DS1624 is an I2C chip.
>Here is a tutorial on the DS1624 by Peter Anderson
>http://www.phanderson.com/stamp/tutorial_8.html
>An N&V article by Jon Williams' on I2C.
>http://www.parallax.com/dl/docs/cols/nv/vol3/col/85.pdf
>
>I think you are using a BS2p, so it has built in I2C commands, and
>you should be able to simplify the code a lot.
>
>The DS1620 is a similar chip that has an SPI interface. I have some
>info on that here:
>http://www.emesystems.com/OL2d1620.htm
>
>-- Tracy
>
>
>
>>hi all,
>>
>>have anyone used the digital thermometer before?
>>
>>i need help on that.
>>
>>regards
> >Ben
>>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and Body of
the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
[noparse][[/noparse]Non-text portions of this message have been removed]
i'm able to capture the temperature already.
thanks alot.
all i did is edit the souce code.
regards
Ben
Tracy Allen <tracy@e...> wrote:
Hi Ben,
These I2C chips need a pullup resistor, around 10 kohms, on the sda
and the scl lines, pulling up to Vdd.
Most of the confusion in the tutorial probably comes from having to
bit-bang the I2C code, which, I agree, can be a lot to chew. You
really have to dig into what it is doing. That is why I recommend you
look Jon William's tutorial too.
If you have a BS2p or BS2pe, it becomes 99.8% easier, because the
Stamp firmware takes care of all the details and does it in a
twinkling of a millisecond. For example, the GOSUB CONFIG command
that is the first step in Prof. Anderson's tutorial becomes,
I2COUT 0,$94,$AC,[noparse][[/noparse]$01]
That one instruction replaces 12 lines of code in the tutorial's
CONFIG subroutine that in turn calls many lines of code in lower
level subroutines.
Then you have the routines to start conversion:
I2COUT 0,$94,[noparse][[/noparse]$EE]
pause 1000 ' <-- delay for conversion to finish-could test status
and to fetch the measurement:
I2COUT 0,$94,[noparse][[/noparse]$AA]
I2CIN 0,$95,[noparse][[/noparse]Hex2 myword]
Don't take my word for it, because I don't have a DS1624 and I have
not tried the code. But that is it for illustration.
By the way, look in the online help for the I2C syntax. Parallax
added an option in the recent releases of the BS2p firmware that
allows an I2C command without an address. The early BS2ps required
an address byte, which made it unsuitable for some of the
instructions above.
-- Tracy
>hi tracy,
>
>i don't really understand the tutorial on the DS1624 by Peter Anderson.
>anyway do i need to add resistor or capacitor at any pin?
>
>can i just copy the souce code from the tutorial?
>
>pls guide me.
>
>regards
>Ben
>
>Tracy Allen wrote:
>The DS1624 is an I2C chip.
>Here is a tutorial on the DS1624 by Peter Anderson
>http://www.phanderson.com/stamp/tutorial_8.html
>An N&V article by Jon Williams' on I2C.
>http://www.parallax.com/dl/docs/cols/nv/vol3/col/85.pdf
>
>I think you are using a BS2p, so it has built in I2C commands, and
>you should be able to simplify the code a lot.
>
>The DS1620 is a similar chip that has an SPI interface. I have some
>info on that here:
>http://www.emesystems.com/OL2d1620.htm
>
>-- Tracy
>
>
>
>>hi all,
>>
>>have anyone used the digital thermometer before?
>>
>>i need help on that.
>>
>>regards
> >Ben
>>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and Body of
the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
[noparse][[/noparse]Non-text portions of this message have been removed]