Can someone help with Dallas 1-wire?
Archiver
Posts: 46,084
I am trying to interface a BS2P to a Texas Weather Instruments Wind
Meter (no temperature) without success. I have downloaded the OW-
WEATHER.bsp written by Jon Williams, and Tim Bitson, but it does not
seem to work either. It returns 32F, 0MPH, and ERROR for temp, speed
and direction respectively. There are 2 possible causes for this as
far as I can tell, and any help isolating and fixing them would be
very helpfull.
The First, and Most Likely Cause: I made an ignorant wiring error...
The RJ11 coming from the stamp is wired as follows: With the female
end facing you, tab down, going left to right:
(5v) (Data Bus) (Gnd) (Gnd)
This is the wiring given by AAG for their weather station, and I am
assuming it is the same as the TWI I am using. I also have a 1k
pullup resistor on pin 15 of the stamp (the data bus). I have seen
many different recommendations for the Rpup, ranging from 5k to 1k or
less. I have tried a 1K, and a 4.7K (the most common 2
recomendations I have seen).
The 2nd Less Likely Cause: Software issue due to lack of
thermometer.
When I first tried the program it struck me as odd that it was
returning a value for the thermometer, despite the lack of the chip.
I thought this might be complicating things, so I went through the
program and had it skip the thermometer. The sensor is selected by
selecting a value for the variable "sensor", 0 through 2 for Temp,
Speed, Direction respectively. I simply added an if statement, that
if sensor = 0, then sensor = 1. This SHOULD have prevented the
program
from going into any of the Temperature subroutines, and appears to
work. I still get 0mph and Error for direction.
I apologize for the very long question, but I was trying to be as
detailed as possible. This is my first experience with 1-wire chips,
so I apologize if anything about this question seems ignorant. I am
fairly familiar with the Stamps however, having used BS2's for about
2 years now. If anymore info would be helpfull just let me know, and
I will post what I can. Thanks in advance for any help.
C. Pond
Meter (no temperature) without success. I have downloaded the OW-
WEATHER.bsp written by Jon Williams, and Tim Bitson, but it does not
seem to work either. It returns 32F, 0MPH, and ERROR for temp, speed
and direction respectively. There are 2 possible causes for this as
far as I can tell, and any help isolating and fixing them would be
very helpfull.
The First, and Most Likely Cause: I made an ignorant wiring error...
The RJ11 coming from the stamp is wired as follows: With the female
end facing you, tab down, going left to right:
(5v) (Data Bus) (Gnd) (Gnd)
This is the wiring given by AAG for their weather station, and I am
assuming it is the same as the TWI I am using. I also have a 1k
pullup resistor on pin 15 of the stamp (the data bus). I have seen
many different recommendations for the Rpup, ranging from 5k to 1k or
less. I have tried a 1K, and a 4.7K (the most common 2
recomendations I have seen).
The 2nd Less Likely Cause: Software issue due to lack of
thermometer.
When I first tried the program it struck me as odd that it was
returning a value for the thermometer, despite the lack of the chip.
I thought this might be complicating things, so I went through the
program and had it skip the thermometer. The sensor is selected by
selecting a value for the variable "sensor", 0 through 2 for Temp,
Speed, Direction respectively. I simply added an if statement, that
if sensor = 0, then sensor = 1. This SHOULD have prevented the
program
from going into any of the Temperature subroutines, and appears to
work. I still get 0mph and Error for direction.
I apologize for the very long question, but I was trying to be as
detailed as possible. This is my first experience with 1-wire chips,
so I apologize if anything about this question seems ignorant. I am
fairly familiar with the Stamps however, having used BS2's for about
2 years now. If anymore info would be helpfull just let me know, and
I will post what I can. Thanks in advance for any help.
C. Pond
Comments
horrible quality (I have three and only one worked out of the box....).
My code is not as smart as you; it doesn't know that you don't have a
temp sensor (my station does). What this means is that you have to
remove that section from the code.
I would suggest writing some test code to make sure you can actually
talk to the individual devices in your particular station. Once you do
that, it will be much easier to update the my program to work for you.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: es_senator_pn [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=3KwhFRSSw3nOr_6MOBB904TJdU0Acnd1Jx9t-6F6W9V92cakZHvzgSQsSChQCS2iUo8GVhqai4UKoUnv8us1pOXq9iD2NNQ]christopher.pond@v...[/url
Sent: Tuesday, September 09, 2003 1:06 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Can someone help with Dallas 1-wire?
I am trying to interface a BS2P to a Texas Weather Instruments Wind
Meter (no temperature) without success. I have downloaded the OW-
WEATHER.bsp written by Jon Williams, and Tim Bitson, but it does not
seem to work either. It returns 32F, 0MPH, and ERROR for temp, speed
and direction respectively. There are 2 possible causes for this as
far as I can tell, and any help isolating and fixing them would be
very helpfull.
The First, and Most Likely Cause: I made an ignorant wiring error...
The RJ11 coming from the stamp is wired as follows: With the female
end facing you, tab down, going left to right:
(5v) (Data Bus) (Gnd) (Gnd)
This is the wiring given by AAG for their weather station, and I am
assuming it is the same as the TWI I am using. I also have a 1k
pullup resistor on pin 15 of the stamp (the data bus). I have seen
many different recommendations for the Rpup, ranging from 5k to 1k or
less. I have tried a 1K, and a 4.7K (the most common 2
recomendations I have seen).
The 2nd Less Likely Cause: Software issue due to lack of
thermometer.
When I first tried the program it struck me as odd that it was
returning a value for the thermometer, despite the lack of the chip.
I thought this might be complicating things, so I went through the
program and had it skip the thermometer. The sensor is selected by
selecting a value for the variable "sensor", 0 through 2 for Temp,
Speed, Direction respectively. I simply added an if statement, that
if sensor = 0, then sensor = 1. This SHOULD have prevented the
program
from going into any of the Temperature subroutines, and appears to
work. I still get 0mph and Error for direction.
I apologize for the very long question, but I was trying to be as
detailed as possible. This is my first experience with 1-wire chips,
so I apologize if anything about this question seems ignorant. I am
fairly familiar with the Stamps however, having used BS2's for about
2 years now. If anymore info would be helpfull just let me know, and
I will post what I can. Thanks in advance for any help.
C. Pond
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/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....