- Name:
-
writei2c
- Syntax:
-
WRITEI2C location,(variable,...)
WRITEI2C (variable,...)
Location - is a variable/constant specifying a byte or word address.
Variable(s) - contains the data byte(s) to be written.
- Description:
-
This command is deprecated, please consider using the hi2cout command instead.
The writei2c (i2cwrite also accepted by the compiler) command writes variable data to the i2c location.
Use of i2c parts is covered in more detail in the separate 'i2c Tutorial' datasheet.
This command is used to write byte data to an i2c device. Location defines the start address of the data to be written, although it is also possible to write more than one byte sequentially (if the i2c device supports sequential writes).
Location must be a byte or word as defined within the i2cslave command. An i2cslave command must have been issued before this command is used.