As I understand it, the PIO implementation varies a bit with the different chips. But they are tri-state: 1. Conducting, 2. Nonconducting and power sense low, 3. Non-conducting and power sense high.
To power devices the PIO can be conducting or non-conducting, which turns a connected device (like an LED) on or off. The voltage can also be sensed, but effectively only in the non-conducting state. This is useful for sensing a switch contact. There is also the state of what you set, as well as what you sense. And some chips can report on transient contact high or low. The datasheets can be confusing (at least to me). The LATH state is usually the "set" state, and the PIO state the actual sensed value. I try to keep "sensed" as read-only low or high based on whether he applied voltage is 0 or ~5V. PIO write is 0 non-conducting and 1 conducting. I used to have PIO read as the reverse ofxsensed, but I've been switching that to the set PIO (latch state I think). That works better with data caching. Latch should be read/write the PIO set state. So Latchand PIO are reversed from the bit value of the datasheet, and sensed is the same. I could certainly use help and feedback on whether the actual function matches this description, I'd like the abstract out this behavior in the code to make the function more consistent and adding new devices easier. Paul Alfille On Tue, May 18, 2010 at 3:14 PM, Guy COLIN <guy.co...@gmail.com> wrote: > Hi > > This is in accordance with owfs man pages: > An owfs write 1 in the PIO will closed the internal switch: that means > connected PIO pin to ground= 0V > The owfs 2408 man page about the sensed propertie says: > Logic level at the PIO pin. 0 = ground. 1 = high (~2.4V - 5V ). > > But the owfs 2408 man page about the sensed propertie also says: > Really makes sense only if the PIO state is set to zero (off), else will > read zero. > I'm not sure to really understand this statement. I think it's when you > use the PIO as an input. > Can anybody clarify? > > By the way your hobby board 8 Channel I/O board has relays with normally > open and normally closed contacts so you can reverse again according to > your needs. > > -- > Guy > > Marc MERLIN a écrit : > > I'd like to add some info about the moisture sensor > > and the hobby board 8 Channel I/O (8 Relay Version) (8CIO8-R1-A or > > 8CIO4-R1-A). > > Can someone give me access to the pages? > > > > > > By the way, the 8 channel I/O from hobby boards works fine with owfs > > from the intial testing I did. > > > http://www.hobby-boards.com/catalog/product_info.php?cPath=24&products_id=1554 > > > > The only weird thing on the I/O board is that I get: > > gargamel:/etc/owfs/bus3/aux/29.E73E06000000# cat sensed.ALL > > 1,1,1,1,1,1,1,1 > > when the input and relay is 0 > > > > gargamel:/etc/owfs/bus3/aux/29.E73E06000000# echo 1 > PIO.3 > > gargamel:/etc/owfs/bus3/aux/29.E73E06000000# cat sensed.ALL > > 1,1,1,0,1,1,1,1 > > > > Any idea why owfs shows the opposite value? > > > > Marc > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers >
------------------------------------------------------------------------------
_______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers