I2C
Inter-Integrated Circuit
I2C Block Diagram
400kHz (default I2C) and 100kHz (SMBus) speeds.
I2C protocol is automatically handled.
User must specify 7-bit I2C address.
GUI (Graphical Programming Interface:
Select Write or Read from the first column (labeled W/R).
Write the data in the next columns (labeled 1, 2, 3 ...) up to 16 bytes.
Read the data by selecting the number of bytes to read, and just leave the cells in the Read row blank.
Add, Insert, or Remove rows with the buttons at the bottom.
Hit Run.
API (Application Programming Interface):
C API:
void init_I2C(int baudrate);
int write_I2C(int addr_7bit, int num_write_bytes, int *write_data);
void write_read_I2C(int addr_7bit, int num_read_bytes, int *write_data, int *read_data);
PYTHON API:
init_i2c(baudrate)
write_i2c(addr_7bit, i2c_data_list)
write_read_i2c(addr_7bit, write_list, num_read_bytes)