Library for NXP (Philips) PCF8591 I2C 4 Channel, 8bit Analog to Digital converter and a 1 Channel, 8bit Digital to Analog converter.

Dependents:   812_hello PCF8591_test_LAAS

Embed: (wiki syntax)

« Back to documentation index

PCF8591_AnalogOut Class Reference

PCF8591_AnalogOut Class Reference

Create a PCF8591 AnalogOut object connected to the specified I2C bus and deviceAddress. More...

#include <PCF8591.h>

Public Member Functions

 PCF8591_AnalogOut (I2C *i2c, uint8_t deviceAddress=PCF8591_SA0)
 Create a PCF8591 Analogout object using a specified I2C bus and slaveaddress.
void write (float value)
 Write Analog Output.
PCF8591_AnalogOutoperator= (float value)
 An operator shorthand for write()

Protected Member Functions

void _init ()
 Initialise DAC driver.

Detailed Description

Create a PCF8591 AnalogOut object connected to the specified I2C bus and deviceAddress.

Definition at line 160 of file PCF8591.h.


Constructor & Destructor Documentation

PCF8591_AnalogOut ( I2C *  i2c,
uint8_t  deviceAddress = PCF8591_SA0 
)

Create a PCF8591 Analogout object using a specified I2C bus and slaveaddress.

Create a PCF8591 AnalogOut object connected to the specified I2C bus and deviceAddress.

Parameters:
I2C&i2c the I2C port to connect to
chardeviceAddress the address of the PCF8591

Definition at line 177 of file PCF8591.cpp.


Member Function Documentation

void _init (  ) [protected]

Initialise DAC driver.

Definition at line 215 of file PCF8591.cpp.

PCF8591_AnalogOut & operator= ( float  value )

An operator shorthand for write()

Operator = Analog Output.

Parameters:
analogOutvalue (0.0f .. 1.0f)

Definition at line 206 of file PCF8591.cpp.

void write ( float  analogOut )

Write Analog Output.

Parameters:
analogOutvalue (0 .. 1.0)

Definition at line 188 of file PCF8591.cpp.