See How You Can Easily Program an I2C EEPROM Using the Promira Serial Platform and the Control Center Serial Command Line Mode on Linux

Using the Promira Serial Platform with I2C Active Level 1 and/or Active Level 2 Applications, you can easily program I2C EEPROM devices. And you can do so using  your choice of software tools to use: Control Center Serial Software, Flash Center Software, or the Promira Software API.

 Promira Serial Platform  Use Control Center Serial Software with your Aardvark Host Adapter or Promira Serial Platform

Figure 1: Promira Serial Platform

Figure 2: Control Center Serial Software

Experience tells us that most people prefer to use command line programming, so we’ll show you an example of using the Control Center Serial Command Line Mode to program an Atmel I2C EEPROM AT24C02, which is in the Total Phase I2C/SPI Activity Board.  For more details about this example, please refer to the knowledge base article Program an I2C EEPROM Using the Promira Serial Platform and the Control Center Serial Command Line on Linux. As the AT24C02 device requires a 7-bit address, you may also find it useful to refer to the article 7-bit, 8-bit, and 10-bit I2C Slave Addressing.

The following steps are similar to those for programming other devices. Specific information about your memory device should be available on the datasheet of the device that you select.

The Setup:

  • The Promira Serial Platform is the I2C master device, and will write and read multiple bytes from the I2C slave
  • AT24C02 is the slave device. The default target address will be used: 0x50.
  • The Promira platform is connected to the Control Center Serial Software on the lab computer.
  • The Promira platform is connected to the AT24C02 in the I2C/SPI Activity Board through the 34-10 I2C/SPI cable.
  • The Promira platform supplies 3.3V I2C signal and 5V VDD signal to the I2C/SPI Activity Board.
  • The Control Center Serial Software is configured in Command Line mode; commands are run on a terminal.

Writing to the I2C EEPROM:

The AT24C02 write operation used in this example is Page Write, which requires a 7-bit device address, a one-byte memory address and then two or more bytes of memory data. This is illustrated in Figure 3 below. The Control Center  Batch mode example i2c-eeprom-write is used to perform the Page Write.

AT240C-pagewrite

Figure 3: AT240C Page Write

Reading from the I2C EEPROM:

The AT240C read operation used in this example is Sequential Read, which requires an I2C write with 7-bit device address, a one-byte memory address and no stop. Then the AT240C Sequential Read operation performs I2C read with 7-bit device address, two or more bytes of memory data, and stop. This is illustrated in Figure 4 below. The Control Center Serial Batch mode example i2c-eeprom-read is used to perform the Sequential Read.

 AT240C-seqread

Figure 4: AT240C Sequential Read

The Results:

Figure 5 below shows the output results after running the batch commands. Note – the beginning of the output shows the configurations that were applied. For details about the configuration, please refer to the article Program an I2C EEPROM Using the Promira Serial Platform and the Control Center Serial Software Command Line on Linux.

 

 commandLineLinux

 

Figure 5: Output

 Additional resources that you may find helpful include the following:

If you have questions about our Total Phase products, feel free to email us at sales@totalphase.com, or if you already own one of our devices and have a technical question, please submit a request for technical support.

Leave a Reply