| ||
| Description: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| An Object that provides access to an I2C device. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operation: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| The oI2C Object reads/writes a byte from/to an I2C device connected to the Local I2C Bus. The Local I2C Bus consists of the Local I2C Clock Line, the Local I2C Data Line, and Ground. The Node property specifies the 7-Bit address of the I2C device with which to communicate. The 7-Bit address is the I2C address that is assigned by the device's manufacturer and is 'hard-wired' into the I2C device. Three different I2C addressing modes are supported as well as either an 8-Bit or 16-Bit data transfer. If the I2C device does not use an internal memory/register location, then the Mode property can be set to 2 (cv7bit) which specifies to send only the 7-Bit I2C address. If the I2C device does use an internal memory/register location, then the Mode property can be set to 0 (cv23bit) or 1 (cv10bit) which specifies to send the 7-Bit I2C address followed by a memory/register location of either 16-Bits or 8-Bits respectively. The Location property specifies the I2C device's memory/register location and is only used when the Mode property is set to 0 or 1. The NoInc property specifies if the Location property is increased each time the I2C device is read from or written to. If the NoInc property is set to 0 then the Location property will be increased by the number of bytes specified by the Width property. If the NoInc property is set to 1 then the Location property is left unchanged. The Width property specifies how many bytes get transferred. If the Width property is set to 0, then 1 byte is transferred. If the Width property is set to 1, then 2 bytes are transferred when the I2C device is read/written. The oI2C Object has no Operate property. Instead when an oI2C Object's Value property is read from or written to the oI2C Object performs all the necessary operations to transfer data to/from the specified I2C device. Once the data has been transferred, the oI2C Object returns to a dormant state. For more information on the specifications of individual I2C devices consult the manufacturer's technical information sheets. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Remarks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| The default property of the oI2C Object cannot be assigned to a pointer. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Storage size & Availability: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the size and availability of the oDio1 Object:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Properties: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the Properties of the oI2C Object:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
In the following example, the oI2C Object is used.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| See Also: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| oEEProm Object | ||||||||||||||||||||||||||||||||||||||||||||||||||||