Great questions! On Sun, May 2, 2010 at 1:35 PM, Mick Sulley <m...@sulley.info> wrote: > Hi, > > I have a few questions regarding DS18S20. > > I am using pwowfs to read the data. Among the parameters it can read is > 'present', but how can this return anything other than 1? If the device > is not present then the read fails. Have I missed something here?
Good pick up. 'present' is a historical artifact. Early design didn't check the existence of a device before trying to read from it. This meant that you could ask for /10.CD1B23000000/type and get the response "DS18S20" even though the chip wasn't present. We now key everything to the actual existence of the chip, so that query reads "Data Error" I'll hide this property and mark it as deprecated. > > I need to read the state of a pressure switch, just an on/off contact. > I looked for a 1-wire sensor to connect it to, but then I thought that > as DS18S20's are so cheap I could use one of those, connect in series > with the signal line and if the device reads then the pressure switch > contact is closed, if it doesn't read then the contact is open. Any > problems with this idea? Is there a better way to do it? Early designs of the weather vane direction used your idea with 8 DS2401s (ID only) which might be even cheaper. You should also look at the DS2406 which can read a contact (PIO). > > As part of these investigations it seems to me that the parameter > 'power' does not actually mean that the device has external power, it > means that the ground lead is not connected to the VDD (+5v) lead. Can > anyone confirm this? > Power comes straight from the chip's report. You can use either whatever you find experimentally, or what the datasheet says. ------------------------------------------------------------------------------ _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers