Driver Software
PHYTEC Meßtechnik GmbH 2004 L-608e_4
147
BYTE I2C_ReadByte (WORD nDevNo, BYTE bChipAddress,
BYTE bSubAddress, BYTE *bByteRead)
bChipAddress: Device address for the I²C device on the bus
bSubAddress: Internal memory address for the I²C device
*bByteRead:
Pointer points to a Byte variable. Result
is written into the Byte variable.
return value:
SUCCESS, NOACK, INVALID_ADDRESS
I2C_ReadByte is used to read a Byte from the memory space of an I²C
device. The result is given in a variable Byte type. This Byte must be
defined before hand.
The function returns an error code as a return value.
NOACK
indicates
that no I²C device has been registered under the given device address.
INVALID_ADDRESS
indicates an unsuccessful attempt to access the
protected area of the EEPROM mounted on the Grabber.
BYTE I2C_WriteByte (WORD nDevNo, BYTE b ChipAddress,
BYTE bSubAddress, BYTE bData)
bChipAddress: Device address of the
I²C device on the bus
bSubAddress: Internal memory address of the
I²C device
bData:
Byte written into the specified address
return value:
SUCCESS, NOACK, INVALID_ADDRESS,
WRITE_FAILED
Writes a Byte into the memory space of a specified I²C device.
The function returns an error code as a return value.
Note:
The internal processing time of some devices (EEPROMs for
example) might be noticable longer than the I²C-bus cycle time. If
several write cycles are sent to such a device, this might result in a
NOACK
-error, since the device is not yet ready to process the next write
cycle.
To avoid this, read commands should be executed after a write cycle,
until the written value is returned. After that, the device is ready to
process a new write cylce. Please refer also to the data sheet of the
I²C-device used.
Summary of Contents for eGrabber-4plus
Page 8: ...eGrabber 4plus PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Page 10: ...eGrabber 4plus PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Page 56: ...eGrabber 4plus 46 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Page 80: ...eGrabber 4plus 70 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Page 81: ...Part 2 Programmer s Manual PHYTEC Meßtechnik GmbH 2004 L 608e_4 71 Part 2 Programmer s Manual ...
Page 82: ...eGrabber 4plus 72 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Page 188: ...eGrabber 4plus 178 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Page 192: ...eGrabber 4plus 182 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Page 204: ...eGrabber 4plus 194 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Page 206: ...Published by PHYTEC Meßtechnik GmbH 2004 Ordering No L 608e_4 Printed in Germany ...