News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

I need some explanation about I2C commands

Started by Yves, Aug 30, 2026, 08:52 AM

Previous topic - Next topic

Yves

In I2C command we have this:
I2Cout SDA_Pin, SCL_Pin, Control, { Address }, [ OutputData ]
My question (please use simple terms): what is the "Control" for?
The manual say this: "Control is a constant value or a byte sized variable expression." what is the function of the Control

I'm trying to write to an AD chip.

many thanks in advance.
Cheers

Yves
Yves

streborc

Control is the device's address on the shared I2C bus, while {address} is the location within the device that is being written to, such as the memory address within a 256K byte EEPROM.  The Control byte is always required even if the device is not sharing the I2C bus.

Yves

Thank you for the clarification  Streborc, now I got it.

Regards,

Yves
Yves