Device::Chip::DAC7571 - chip driver for DAC7571
Device::Chip::DAC7571
use Device::Chip::DAC7571; my $chip = Device::Chip::DAC7571->new; $chip->mount( Device::Chip::Adapter::...->new )->get; # Presuming Vcc = 5V $chip->write_dac( 4096 * 1.23 / 5 )->get; print "Output is now set to 1.23V\n";
This Device::Chip subclass provides specific communication to a Texas Instruments DAC7571 attached to a computer via an I²C adapter.
The reader is presumed to be familiar with the general operation of this chip; the documentation here will not attempt to explain or define chip-specific concepts or features, only the use of this module to access them.
The I²C address of the device. Can be specified in decimal, octal or hex with leading 0 or 0x prefixes.
0
0x
The following methods documented with a trailing call to ->get return Future instances.
->get
$chip->write_dac( $dac, $powerdown )->get
Writes a new value for the DAC output and powerdown state.
$powerdown is optional and will default to normal if not provided. Must be one of the following four values
$powerdown
normal
normal 1k 100k hiZ
Paul Evans <leonerd@leonerd.org.uk>
To install Device::Chip::AnalogConverters, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Chip::AnalogConverters
CPAN shell
perl -MCPAN -e shell install Device::Chip::AnalogConverters
For more information on module installation, please visit the detailed CPAN module installation guide.