Simon Natterer | 28 Nov 2004 02:12
Picon

DS2408 strobe

Hi!

I just started testing the DS2408 to write to a LCD Display and recognized
one unclarity concerning strobe. In the man-page I read:

   strobe
       read-write, yes-no
       Is the DS2408 powered parasitically (0) or separately on the Vcc 
pin (1)?

This is the same I read for power (and why write?).

But in the datasheet you can read: 
(http://pdfserv.maxim-ic.com/en/ds/DS2408.pdf)

On page 1: The RSTZ signal is configurable to serve as either a 
hard-wired reset
for the PIO output or as a strobe for external circuitry to indicate 
that a PIO write
or PIO read has completed.

In the example on page 28 the RSTZ Pin is used as a strobe, to signal
valid data to the LCD controller (the controller needs a falling edge).

Is this an error in the manpage or is the implementation different?
I'll try it out, if it works, I can tell you :-)

Keep up the great work

Simon
(Continue reading)

Paul Alfille | 28 Nov 2004 15:04
Picon
Favicon

Re: DS2408 strobe

Simon,

Thanks for your note. I've updated the man page and web page a little,
but I'm not sure I really address your point..

In short, the datasheet is confusign to me. I gather there is a mode
where the DS2408 is used for relatively high-speed communication through
it's PIO pins, with the strobe pin used for handshaking. This fits
poorly into the OWFS model. OWFS pretends the 1-wire devices are
block-devices (think of 1-wire as a scsi controller), not a character
devices (like a serial line).

The strobe pin is set correctly (I think) for using the DS2408 as an
8-channel switch or sensor. The strobe property can be ignored in this
case. I really don't know the ramifications of changing strobe, but it's
available if needed.

Please give feedback and suggestions, especially on how to better
describe or model the DS2408 interface.

Paul

On Sat, 2004-11-27 at 20:12, Simon Natterer wrote:
> Hi!
> 
> I just started testing the DS2408 to write to a LCD Display and recognized
> one unclarity concerning strobe. In the man-page I read:
> 
>    strobe
>        read-write, yes-no
(Continue reading)

Simon Natterer | 28 Nov 2004 21:05
Picon

Re: DS2408 strobe

Paul Alfille wrote:

>In short, the datasheet is confusign to me. I gather there is a mode
>where the DS2408 is used for relatively high-speed communication through
>it's PIO pins, with the strobe pin used for handshaking. This fits
>poorly into the OWFS model. OWFS pretends the 1-wire devices are
>block-devices (think of 1-wire as a scsi controller), not a character
>devices (like a serial line).
>  
>

It seems to work for me! The RSTZ pin signals correctly
when the written data is valid, for me it is connected to
the display-enable-pin and the display works. So I think
the RSTZ pin generates a falling edge after each
byte is written.
So if in owfs strobe is set to 1 it has this behavoir, if it
is set to 0 the RSTZ pin is used as a reset pin.
I don't see a problem.

What I recognized is a strange behavoir with PIO.ALL
and PIO.x. All data seems to be written inverted.
If I write 1,1,1,1,1,1,1,1 and read sensed.ALL I get
0,0,0,0,0,0,0,0.
sensed.ALL shows the correct electrical value
(0 V for all Pins).

An example (owfs from cvs, one day old):
echo 0,0,0,0,0,0,0,0 > PIO.ALL
cat PIO.ALL
(Continue reading)

Paul Alfille | 28 Nov 2004 20:18
Picon
Favicon

Re: DS2408 strobe

On Sun, 2004-11-28 at 15:05, Simon Natterer wrote:
> What I recognized is a strange behavoir with PIO.ALL
> and PIO.x. All data seems to be written inverted.
> If I write 1,1,1,1,1,1,1,1 and read sensed.ALL I get
> 0,0,0,0,0,0,0,0.
> sensed.ALL shows the correct electrical value
> (0 V for all Pins).
> 
This comes from the dual meaning of the PIO pins. When used as a switch,
turning "on" makes them conducting, but conducting a sink to ground.
They will read 0 if there in no voltage applied. I made turning "on" a
"1", which corresponds, I thought, to expectations.

PIO and sensed are really mutually exclusive, ?IO is active and masks
any sensed signals. 

> And if you ask what would be convenient: A filedescriptor
> to write one byte as a 8-Bit Value, so I can use a
> C-Programm to write a single byte.
Propose a name for your PIObyte. I'll put it in today. I assume that
PIO.0 will be the lowest order byte, and PIO.7 will be in the 128
position.

> And I don't see any reason to in/output the values for the
> .ALL descriptors comma-separated. I don't think this
> makes it more readable, quite the contrary.
> 
It's probably not that convenient, but matches the syntax for all the
other array properties in OWFS.

(Continue reading)

Simon Natterer | 28 Nov 2004 22:32
Picon

Re: DS2408 strobe

Paul Alfille wrote:

>This comes from the dual meaning of the PIO pins. When used as a switch,
>turning "on" makes them conducting, but conducting a sink to ground.
>They will read 0 if there in no voltage applied. I made turning "on" a
>"1", which corresponds, I thought, to expectations.
>  
>

Hmmm OK, this makes sense, now I understand it.

>
>Propose a name for your PIObyte. I'll put it in today. I assume that
>PIO.0 will be the lowest order byte, and PIO.7 will be in the 128
>position.
>  
>

Great! PIO.0 should be least significant bit, PIO.7 the most
significant, right.
Well you said it. Why not PIObyte. Or PIObinary,
PIObinary.ALL. You know your naming conventions better :-)

>It's probably not that convenient, but matches the syntax for all the
>other array properties in OWFS.
>  
>

OK.

(Continue reading)

Paul Alfille | 28 Nov 2004 22:30
Picon
Favicon

gmane

The OWFS-developers mailing list is now mirrored on gname.

http://news.gmane.org/gmane.comp.file-systems.owfs.devel

The point of gmane seems to be allowing various interfaces to the
mailing list, like web, search, blog, etc.

gmane also seems to use FUSE internally, which is how I found the
reference.

Paul

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
Paul Alfille | 29 Nov 2004 04:18
Picon
Favicon

Re: DS2408 strobe

It's not ready, yet, but there will be a PIO.BYTE and sensed.BYTE
property.

I've been working on making the a general feature for bitmapped arrays.

Paul

On Sun, 2004-11-28 at 16:32, Simon Natterer wrote:
> Paul Alfille wrote:
> 
> >This comes from the dual meaning of the PIO pins. When used as a switch,
> >turning "on" makes them conducting, but conducting a sink to ground.
> >They will read 0 if there in no voltage applied. I made turning "on" a
> >"1", which corresponds, I thought, to expectations.
> >  
> >
> 
> Hmmm OK, this makes sense, now I understand it.
> 
> >
> >Propose a name for your PIObyte. I'll put it in today. I assume that
> >PIO.0 will be the lowest order byte, and PIO.7 will be in the 128
> >position.
> >  
> >
> 
> Great! PIO.0 should be least significant bit, PIO.7 the most
> significant, right.
> Well you said it. Why not PIObyte. Or PIObinary,
> PIObinary.ALL. You know your naming conventions better :-)
(Continue reading)

Peter Kropf | 30 Nov 2004 00:03

Re: Segmentation fault when attempting to execute complied owhttpd and owfs with USB interface

I'm seeing a segmentation fault also when running owfs or owhttpd. I'm running on a Debian
system w/ a 2.6.9 kernel. I'm using the latest CVS source.

Here's a limited gdb session:

think:/home/peter# gdb
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux".
(gdb) file /opt/owfs/bin/owhttpd
Reading symbols from /opt/owfs/bin/owhttpd...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) r -p 3001 -u
Starting program: /opt/owfs/bin/owhttpd -p 3001 -u
[Thread debugging using libthread_db enabled]
[New Thread -1209765216 (LWP 5404)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209765216 (LWP 5404)]
0xb7f9f923 in usb_reset () from /lib/libusb-0.1.so.4
(gdb) bt
#0  0xb7f9f923 in usb_reset () from /lib/libusb-0.1.so.4
#1  0xb7fd8986 in DS9490_detect () at ow_ds9490.c:90
#2  0xb7fdb9a5 in USBSetup () at owlib.c:220
#3  0xb7fdb55e in owopt (c=0, arg=0x0) at ow_opt.c:79
#4  0x0804978d in main (argc=4, argv=0xbffffb04) at owhttpd.c:121
(Continue reading)

Geo Carncross | 30 Nov 2004 01:46
Favicon

Re: Re: Segmentation fault when attempting to execute complied owhttpd and owfs with USB interface

You seem to be able to use gdb, can you break on usb_open and usb_reset,
record the contents of global devusb after return from usb_open, and
before entering usb_reset?

If they match, there may be a problem with your libusb installation.

If they don't, there might be something more nefarious going on...

I have tested recent CVS builds of owhttpd or owfs using libusb
exclusively using:
	Debian Woody
	Fedora Core 1
	Fedora Core 2
	Fedora Core 3
	Gentoo 1.4
	Gentoo 2004.2
	Gentoo 2004.0

I'm sorry that these are the only installations that I am able to test.

While you may have better luck asking the appropriate libusb mailing
lists, information about your setup might prove useful here as well.

Is there a particular reason you built libusb separately?

Is there a particular reason you installed libusb into /lib?

Do you have other programs using libusb that function correctly?

Can you uninstall the libusb you built manually and try the one that
(Continue reading)

Paul Alfille | 30 Nov 2004 01:32
Picon
Favicon

Re: Re: Segmentation fault when attempting to execute complied owhttpd and owfs with USB interface

Good idea, I'll start a FAQ.

Unrelated question, Geo: AC_MSG_WARN in configure.ac gives me warnings.
I finally commented it out. Any ideas?

Paul

On Mon, 2004-11-29 at 19:46, Geo Carncross wrote:
> You seem to be able to use gdb, can you break on usb_open and usb_reset,
> record the contents of global devusb after return from usb_open, and
> before entering usb_reset?
> 
> If they match, there may be a problem with your libusb installation.
> 
> If they don't, there might be something more nefarious going on...
> 
> I have tested recent CVS builds of owhttpd or owfs using libusb
> exclusively using:
> 	Debian Woody
> 	Fedora Core 1
> 	Fedora Core 2
> 	Fedora Core 3
> 	Gentoo 1.4
> 	Gentoo 2004.2
> 	Gentoo 2004.0
> 
> I'm sorry that these are the only installations that I am able to test.
> 
> While you may have better luck asking the appropriate libusb mailing
> lists, information about your setup might prove useful here as well.
(Continue reading)


Gmane