Introduction
Programming I2C memory devices is a common use case for the Promira Platform with I2C Active Level 1 Application. There are several ways to do this with the Promira Platform, including using Control Center Serial, Flash Center, or the Promira API. This article focuses on how to take the information in an EEPROM datasheet and execute the commands in Control Center Serial. This article also shows how to configure the Promira platform in order to supply low voltage level to the I2C EEPROM. Although the following describes the Microchip 24FC512 I2C EEPROM with the EEPROM Socket Board - 10/34, similar steps can be used for other devices. The goal of this article is to demonstrate how to write several bytes to a specific address and then read back those bytes.
Overview
In this article the Promira platform is the I2C master and the I2C EEPROM 24FC512 in the EEPROM Socket Board - 10/34 is the I2C slave. The Promira platform is connected to the 24FC512 1.8V PDIP-8 in the EEPROM Socket Board - 10/34 through the 34-34 I2C/SPI cable. The Promira platform supplies 1.8V I2C signals and 1.8V VDD signal to the I2C EEPROM 24FC512 in the EEPROM Socket Board - 10/34. For additional information take a look at Figure 1: Promira and 24FC512 Block Diagram, and EEPROM Socket Board 10/34 user manual.
Figure 1: Promira and 24FC512 Block Diagram
24FC512 Details
The 24FC512 I2C EEPROM on the EEPROM Socket Board 10/34 has a hardware configurable I2C target address. The default I2C target address is 1010000b, which is 0x50. This article uses the default I2C target address 0x50. For additional information take a look at Figure 2: 24FC512 Control Byte Format and knowledge base article 7-bit, 8-bit, and 10-bit I2C Slave Addressing.
Figure 2: 24FC512 Control Byte Format
The 24FC512 write operation used here is Page Write. The Page Write operation to the 24FC512 requires 7 bit device address, two byte memory address, and two or more bytes of memory data. Performing a memory write operation requires a single command from the Promira platform and Control Center Serial. In this case, the Control Center Serial "Master Write" command includes the device address (0x50), memory address (0x0008), and memory data (0x0A 0x0B 0x0C).
Figure 3: 24FC512 Page Write
The 24FC512 read operation used here is the Sequential Read. The 24FC512 Sequential Read operation first performs I2C write with 7 bit device address, two byte memory address and no stop. Then the 24FC512 Sequential Read operation performs I2C read with 7 bit device address, two or more bytes of memory data, and stop. Performing a memory read operation requires a single command from the Promira Platform and Control Center Serial. In this case, the Control Center Serial "Master Register Read" command includes the device address (0x50), memory address (0x0008), address width (2 bytes), and number of data bytes (3). For additional information take a look at the 24FC512 datasheet.
Figure 4: 24FC512 Sequential Read
Promira Platform Configuration
The I2C EEPROM on the EEPROM Socket Board 10/34 receives the I2C pulls-ups, 1.8V power, and 1.8V I2C signals from the Promira platform. In order to supply the I2C pull-ups, 1.8V power, and 1.8V I2C signals to the I2C EEPROM on the EEPROM Socket Board - 10/34, the Promira platform and Control Center Serial should be configured to I2C pull-ups enabled, Target Power (Pin 4,6) to Off, IO Power (Pin 22,24) enabled, and Level Shift to 1.8V. For additional information take a look at the Promira platform user manual, Control Center Serial user manual, and EEPROM Socket Board 10/34 user manual.
Writing and Reading Guidelines
- Connect the Promira platform USB connector to the PC USB connector.
- Follow the instructions in Section 3.2 - Connectivity of the Promira platform user manual to configure the Ethernet over USB interface.
- Download and unzip the latest version of Control Center Serial. (?)
- Connect the Promira platform I2C/SPI connector to the EEPROM Socket Board 10/34 Promira connector through 34-34 cable as shown in Figure 6. On the EEPROM Socket Board 10/34 install jumpers on VDD SOURCE: VLvl, J3, and J4: 1&2. On EEPROM Socket Board 10/34 install wires on (?):
- J6 – 3 to J5 – 2 (White, GND)
- J6 – 2 to J5 – 3 (Purple, GND)
- J6 – 1 to J5 – 4 (Blue, GND)
- J7 – 3 to J5 – 5 (Green, GND)
- J6 – 4 to J5 – 1 (Yellow, GND)
- J10 – 1 to J7 – 4 (Orange, VDD)
- J9 – SDA to J7 – 1 (Red, SDA)
- J9 – SCL to J7 – 2 (Brown, SCL)
- Launch Control Center Serial. (?)
- Connect Control Center Serial to the Promira platform. (?)
- Click Adapter, and choose Connect.
- Select the Promira platform.
- Click OK to connect to the Promira platform.
- Click Adapter, and choose I2C+SPI.
- Click Adapter, enable I2C Pulls-Ups, disable Target Power (Pin 4,6), enable IO Power (Pin 22,24), and configure Level Shift to 1.8V.
- Configure the adapter as an I2C Master using the I2C Control panel. (?)
- Click on the Master tab.
- Enter 1000 in Bitrate rectangular, and click Set.
- Enter 0x50 in Slave Address field.(?)
- Disable 10 Bit Addr and No Stop.
- Write 0A 0B 0C to 24FC512 in memory address 00 08.
- Enter 00 08 0A 0B 0C in the Message field, and click Master Write.
- Read 0A 0B 0C from 24FC512 in memory address 00 08.
- Enter 0x0008 in Register Address
- Select 2 bytes in Address Width
- Enter 3 in Number of Data Bytes
- Click Master Register Read, and verify that the read data is 0A 0B 0C.
Figure 5: Promira Programs 24FC512
Figure 6: Programing System
Figure 7: EEPROM Socket Board
Notes
For additional information, take a look at the Promira platform user manual, Control Center Serial user manual, and EEPROM socket board - 10/34 user manual.