|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--de.wagner_ibw.iow.i2c.AbstractI2CDevice
|
+--de.wagner_ibw.iow.i2c.PCF8591
This is the implementation of the PCF8591 device, "8-bit A/D and D/A converter".
| Field Summary | |
static int |
ANALOGUE_OUTPUT_ENABLE
Constant for 'Analogue Output Enable Flag' (analogue output active if 1). |
static int |
AUTOINCREMENT
Constant for 'Autoincrement Flag' (switched on if 1). |
static int |
CLASS
Group 1 part of slave address for PCF8591 |
static int |
INPUT_MODE_0
Constant for 'Analogue Input Programming': Four single ended inputs. |
static int |
INPUT_MODE_1
Constant for 'Analogue Input Programming': Three differential inputs. |
static int |
INPUT_MODE_2
Constant for 'Analogue Input Programming': Single ended and differential mixed. |
static int |
INPUT_MODE_3
Constant for 'Analogue Input Programming': Two differential inputs. |
static java.lang.String |
NAME
PCF8591 device specific constants. |
| Fields inherited from class de.wagner_ibw.iow.i2c.AbstractI2CDevice |
MAX_I2C_LENGTH |
| Constructor Summary | |
PCF8591(int deviceAddress)
Constructor. |
|
| Method Summary | |
void |
disableAnalogueOutput()
|
void |
enableAnalogueOutput()
|
boolean |
equals(java.lang.Object o)
Indicates whether some other PCF8591 object is "equal to" this one. |
int |
getChannel(int channel)
Returns the value of the desired A/D channel. |
int[] |
getChannels()
Returns the values of all A/D channels. |
int |
hashCode()
Returns a hash code value for this PCF8591 object. |
void |
setAnalogueInputProgramming(int mode)
|
void |
setAnalogueOutputValue(int value)
|
void |
setIowDevice(AbstractIowDevice iow)
Sets the reference to an IO-Warrior device for write report operations. |
java.lang.String |
toString()
Returns Information about this PCF8591 as String. |
| Methods inherited from class de.wagner_ibw.iow.i2c.AbstractI2CDevice |
getI2cAddress, getName, readI2C, reportReceived, setMonitor, writeI2C |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String NAME
public static final int CLASS
public static final int AUTOINCREMENT
public static final int ANALOGUE_OUTPUT_ENABLE
public static final int INPUT_MODE_0
public static final int INPUT_MODE_1
public static final int INPUT_MODE_2
public static final int INPUT_MODE_3
| Constructor Detail |
public PCF8591(int deviceAddress)
throws java.lang.Exception
deviceAddress - Group 2 part of slave address (possible values 0...7).
java.lang.Exception - If anything goes wrong.| Method Detail |
public void setAnalogueInputProgramming(int mode)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public int getChannel(int channel)
throws java.lang.Exception,
java.lang.IllegalArgumentException
channel -
java.lang.Exception
java.lang.IllegalArgumentException
public int[] getChannels()
throws java.lang.Exception,
java.lang.IllegalArgumentException
java.lang.Exception
java.lang.IllegalArgumentExceptionpublic void enableAnalogueOutput()
public void disableAnalogueOutput()
public void setAnalogueOutputValue(int value)
throws java.lang.Exception,
java.lang.IllegalArgumentException
value -
java.lang.Exception
java.lang.IllegalArgumentExceptionpublic void setIowDevice(AbstractIowDevice iow)
I2CDevice
setIowDevice in interface I2CDevicesetIowDevice in class AbstractI2CDeviceiow - Instance of an IO-Warrior device.public java.lang.String toString()
toString in class AbstractI2CDevicepublic boolean equals(java.lang.Object o)
equals in class AbstractI2CDevicepublic int hashCode()
hashCode in class AbstractI2CDevice
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||