This is an old revision of the document!
In this tutorial, an approach for accessing AT24C EEPROM via I2C bus on is presented. Cubieboard1 or Cubieboard2 expand out groups of I2C pins which could be connected to peripheral I2C slave devices, like RTC device(DS1307), EEPROM device(AT24C) etc. It's possible to connect serval slave devices on a single I2C interface, because I2C has the ability to communicate with different device by various device address. For details, you may look into literatures describing I2C protocols.
In order to access peripheral I2C devices, Cubieboard's script.bin should enable I2C interfaces. Edit script.fex, make certain that the following lines exist there.
[twi1_para] twi1_used = 1 twi1_scl = port:PB18<2><default><default><default> twi1_sda = port:PB19<2><default><default><default>
This will configure Cubieboard's IO port PB18 & PB19 to TWI1-SCK & TWI1-SDA (I2C-1).