Hardware::iButton

Hardware::iButton is a Perl module that allows to talk to DalSemi iButtons via a DS2480 serial widget.
Download

Hardware::iButton Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Brian Warner
  • Publisher web site:
  • http://search.cpan.org/~scott/Hardware-iButton-0.03/lib/Hardware/iButton/Connection.pm

Hardware::iButton Tags


Hardware::iButton Description

Hardware::iButton is a Perl module that allows to talk to DalSemi iButtons via a DS2480 serial widget. Hardware::iButton is a Perl module that allows to talk to DalSemi iButtons via a DS2480 serial widget.SYNOPSIS use Hardware::iButton::Connection; $c = new Hardware::iButton::Connection "/dev/ttyS0"; @b = $c->scan(); foreach $b (@b) { print "family: ",$b->family(), "serial number: ", $b->serial(),"n"; print "id: ",$b->id(),"n"; # id = family . serial . crc print "reg0: ",$b->readreg(0),"n"; }This module talks to iButtons via the "active" serial interface (anything using the DS2480, including the DS1411k and the DS 9097U). It builds up a list of devices available, lets you read and write their registers, etc.The connection object is an Hardware::iButton::Connection. The main user-visible purpose of it is to provide a list of Hardware::iButton::Device objects. These can be subclassed once their family codes are known to provide specialized methods unique to the capabilities of that device. Those devices will then be Hardware::iButton::Device::DS1920, etc.iButtons and solder-mount Touch Memory devices are each identified with a unique 64-bit number. This is broken up into 8 bits of a "family code", which specifies the part number (and consequently the capabilities), then 48 bits of device ID (which Dallas insures is globally unique), then 8 bits of CRC. When you pass these IDs to and from this package, use hex strings like "0123456789ab". Requirements: · Perl


Hardware::iButton Related Software