Cyclone® V Hard Processor System Technical Reference Manual

ID 683126
Date 8/28/2023
Public
Document Table of Contents

21.5.1.1. Initial Configuration

To use the I2C controller as a slave, perform the following steps: †

  1. Disable the I2C controller by writing a 0 to bit 0 of the IC_ENABLE register. †
  2. Write to the IC_SAR register (bits 9:0) to set the slave address. This is the address to which the I2C controller responds. †
    Note: The reset value for the I2C controller slave address is 0x55. If you are using 0x55 as the slave address, you can safely skip this step.
  3. Write to the IC_CON register to specify which type of addressing is supported (7- or 10-bit by setting bit 3). Enable the I2C controller in slave-only mode by writing a 0 into bit 6 (IC_SLAVE_DISABLE) and a 0 to bit 0 (MASTER_MODE). †
    Note: Slaves and masters do not have to be programmed with the same type of addressing 7- or 10-bit address. For instance, a slave can be programmed with 7-bit addressing and a master with 10-bit addressing, and vice versa. †
  4. Enable the I2C controller by writing a 1 in bit 0 of the IC_ENABLE register. †