In this case, Control Center Serial batch mode example "i2c-eeprom-read" is used in order to perform read of 256 bytes from address 00 with I2C device address 0x50. Performing a memory read operation with the Promira platform requires two commands from the adapter and Control Center Serial batch mode. Then the AT240C Sequential Read operation performs I2C read with 7 bit device address, two or more bytes of memory data, and stop. The AT240C Sequential Read operation first performs I2C write with 7 bit device address, one byte memory address and no stop. The AT240C read operation used here is the Sequential Read. While the last "i2c_write" command includes the I2C device address (addr="0x50"), number of data bytes (count="2"), data format (radix="16"), memory address (0xFF), and memory data (0xFF). The first command includes the device address (addr="0x50"), number of data bytes (count="2"), data format (radix="16"), memory address (0x00), and memory data (0x00). For example, take a look at the first and last i2c_write commands. In this case, Control Center Serial batch mode example "i2c-eeprom-write" is used in order to perform 256 "i2c_write" commands of data 0x00 - 0xFF to memory addresses 0x00 to 0xFF with I2C device address 0x50. Performing a memory write operation with the Promira platform requires a single command from the adapter and Control Center Serial. The Page Write operation to the AT24C02 requires 7 bit device address, one byte memory address, and two or more bytes of memory data. The AT24C02 write operation used here is Page Write. For additional information take a look at the I2C/SPI activity board user's manual. In order to supply the I2C pull-ups and target power to the Activity board, the Promira platform and Control Center Serial are configured with the batch command "configure" to I2C/SPI mode (i2c="1" spi="1" gpio="0"), I2C pull-ups enabled (pullups="1"), and target power enabled (tpower="1").
The AT24C02 on the I2C/SPI activity board receives the I2C pulls-ups and power from the Promira platform. For additional information take a look at knowledge base article 7-bit, 8-bit, and 10-bit I2C Slave Addressing. This article uses the default I2C target address 0x50. The default I2C target address is 1010000b, which is 0x50. The AT24C02 I2C EEPROM on the activity board has a hardware configurable I2C target address. The AT24C02 VCC (Power Supply) signal is connected 3.3V. The AT24C02 A0 - A2 (Address Input), WP (Write Protect) and GND (Ground) signals are connected to ground. In this article, the AT24C02 SCL (Serial Clock Input) and SDA (Serial Data) signals are connected to the Promira platform SCL and SDA signals accordingly. For additional information take a look at I2C/SPI I2C/SPI activity board users manual and the AT24C02 datasheet. The Promira platform supplies 3.3V I2C signals and 5V VDD signal to the I2C/SPI Activity Board. The Promira platform is connected to the AT24C02 in the I2C/SPI Activity Board through the 34-10 I2C/SPI cable. Here the Promira platform is the I2C master and the AT24C02 in the I2C/SPI Activity Board is the I2C slave. In this article, the Promira platform writes and reads multiple bytes from AT24C02. Although the following describes the Atmel I2C EEPROM AT24C02 found on the I2C/SPI Activity Board, similar steps can be used for other devices.
#Serial ee prom programming how to#
This article focuses on how to how to take the information from an EEPROM datasheet and execute the commands in Control Center Serial Software Command Line mode by using the batch commands and example file. There are several ways to do this with the Promira™ Serial Platform, including using Control Center Serial, Flash Center, or the Promira API. Programming I2C memory devices is a common use case for the Promira™ Serial Platform with I2C Active Level 1-2 Applications.