-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/20/2012 3:03 PM, Kent A. Reed wrote:
> On 12/20/2012 1:56 PM, [email protected] wrote:
>> Just by chance has anyone already written the code for linuxcnc
>> to handle something like this connected to a single parallel port
>> pin http://www.adafruit.com/products/374
>> 
>> Richard
>> 
> 
> Richard:
> 
> To quote an old movie line "Don't know nothing 'bout it."
> 
> So, armed with my trusty Internet search engine, I tried to learn 
> something about it. The first thing I found was this quote from an
> old Dallas Semiconductor datasheet (they're now part of Maxim
> Integrated):
> 
>> NMI interrupts of the PC will not guarantee flawless
>> communication to a 1-Wire device through a parallel port
>> directly, and is discouraged to attempt. As the 1-Wire protocol
>> requires the first 15us of each time slot to contain the data
>> information, any disruption of this time segment will result in a
>> communication error.

+1

I've implemented 1-wire interfaces (in hardware and on
micro-controllers), and they are timing sensitive, at least for the
identification of a 1 or zero bit (the bit-to-bit timings are pretty
loose).

You could probably get something to work with a tuned LinuxCNC system
(no nasty latency hiccups), but you would almost certainly have to
handle a single bit in one run of the high-speed thread (meaning
busy-waits and chewing up at least the 15 uS per invocation).

I2C is much more relaxed for timing constraints, and only uses one
more parallel port pin (3 vs. 2 for the "1-wire" bus).  Note despite
the 1-Wire name, you need to parallel port pins (one output, one
input) and a transistor, fet, or diode (to make the output
open-collector) unless you've got something fancy like a Mesa card
that can do bidirectional open-collector I/O on a single pin...in
which case why are you looking at 1-Wire devices?!? :)

While I can appreciate the money having only one signal wire saves in
things like automotive wiring harnesses, my main use for these devices
was as a unique serial number (each 1-Wire device has a guaranteed
globally unique address).  Since everything was on one circuit board,
the cost for extra 'wires' to talk to an I2C temperature sensor was
inconsequential.

<shameless plug>
BTW: I have an I2C driver available as part of my hacking LinuxCNC to
talk to a 3D printer:

https://github.com/cdsteinkuehler/LinuxCNC-RepRap/blob/master/components/I2C.comp

</shameless plug ;->

- -- 
Charles Steinkuehler
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlDThS8ACgkQLywbqEHdNFwQcwCgtaDzJ4iUVpBvAsiFbKDWt7ON
ESEAoNw74VPDLWgfun6vLvmR95KD3HFo
=8GGH
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to