Am Dienstag, 18. Oktober 2011, 12:43:08 schrieb ekgnkb3d:
> Hello again,
> 
> > Ok. I²C is CPU-hungry, as it involves busy-loops on kernel level for most
> > I²C
> > hosts. Bitbanging hosts are most annoying as they need the kernel to stop
> > for
> > 10µs after each bit. Nothing useful to do in such a short time.
> 
> I'm using an iMX.257 CPU. According the Feature list there is hardware
> supporting the I²C bus. I hope it is not so CPU-hungry
> 
Ok, that usually means there is a least a 9 bit shift register for the bus, 
sometimes an ACK/NACK logic, too. Maybe even an interrupt after a byte has 
been sent/received (after ~100µs).


> Nevertheless, I've tested the USB adapter DS9490R which even took more CPU
> load as the DS2482
> 
Possible, if the USB host is taking a lot of the load. On a normal PC, the USB 
is adapter less resource hungry and faster.


> 
> Hmm, I never looked into the OWFS details, but I use the CAPI with one
> OW_init() and an OW_get() per loop & device. So I hope it never uses
> "Search ROM" and only uses "Match ROM"
> 
"Search ROM" is done when you are scanning for new chips. In OWFS this is done 
by reading the /uncached directory (the directory, not any of the chip nodes).
Costly operation, especially for I²C and RS232, because each chip on the 
onewire requires 192 Bits to be sent on the bus. That gives ~1000 bits/chip on 
I²C/RS232 side. The USB host adapter handles this operation internally.

"Match ROM" is done when you are addressing a single known chip. Triggered 
when accessing any of the chip nodes.


There are three other onewire commands.

"Read ROM" to read the address of a single connected chip. Triggered by 
reading /simultaneous/present and /simultaneous/single (and _ds2400 nodes)

"Skip ROM" is there to address all chips on a bus synchronously. Only useable 
with subcommands which give no reply. E.g. simultaneous conversion start. 
Triggered by /simultaneous/temperature and /simultaneous/voltage

"Conditional Search ROM" is same as "Search ROM", but only chips in alarmed 
state will reply. Costly as "Search ROM", but only alarmed chips count.
Triggered by reading the /alarm directory (the directory, not any of the chip 
nodes).


> 
> > I haven't checked the temperature sensors, though. Are you
> > sampling/reading
> > them directy, or do you trigger /simultaneous/temperature before, then
> > delay
> > the loop, then read?
> 
> I'm reading them directly and guessing I have to, because they are not
> powered (2-wires connection only, no Vcc). But it's a good idea to try
> it...
> 
Please see the relevant function when doing a direct conversion:
owfs-2.8p13/module/owlib/src/c/ow_1820.c 

/* Powered temperature measurements -- need to poll line since it is held low 
during measurement */
/* We check every 10 msec (arbitrary) up to 1.25 seconds */
GOOD_OR_BAD FS_poll_convert(const struct parsedname *pn)

...

Maybe Paul can give some enlightenment on this.

Kind regards

        Jan

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to