I2C SPI USB CAN eSPI Cable Testing View All Videos Quick Start Guides Software Downloads App Notes White Papers User Manuals Knowledge Base Sales Support About Us
Products Blog Sales Support Contact Search
Programming I2C EEPROM Using Aardvark Adapter Level Shifter Board and Control Center
Programming I2C EEPROM Using Aardvark Adapter, Level Shifter Board and Control Center

Introduction

Programming I2C memory devices is a common use case for the Aardvark I2C/SPI Host Adapter and level shifter board. There are several ways to do this with the Aardvark adapter, including using Control Center, Flash Center, or the Aardvark API. This article focuses on how to take the information in an EEPROM datasheet and execute the commands in Control Center. This article also shows how to use the level shifter board 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, 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 Aardvark adapter is the I2C master and the I2C EEPROM 24FC512 in the EEPROM socket board is the I2C slave. The Aardvark is connected to the 24FC512 1.8V SOIC-8 in the EEPROM socket board through the level shifter board. The level shifter board converts the Aardvark 3.3V I2C signals and 5V VDD signal to 1.8V I2C signals and 1.8V VDD signal. For additional information take a look at Figure 1: Aardvark and 24FC512 Block Diagram, level shifter board user manual, and EEPROM socket board user manual.

Figure 1: Aardvark and 24FC512 Block Diagram

24FC512 Details

The 24FC512 I2C EEPROM on the EEPROM socket board 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 I2C EEPROM on the EEPROM socket board receives the I2C pulls-ups and power from the Aardvark adapter. In order to supply the I2C pull-ups and target power to the I2C EEPROM on the EEPROM socket board, the Aardvark adapter should be configured to I2C pull-ups enabled and target power enabled. For additional information take a look at the EEPROM socket board user manual.

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 with the Aardvark adapter requires a single command from the adapter and Control Center. In this case, the Control Center "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 with the Aardvark adapter requires a single command from the adapter and Control Center. In this case, the Control Center "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

Writing and Reading Guidelines

      1. Download and run the latest version of the Total Phase USB Drivers Installer.
      2. Download and unzip the latest version of Control Center. (?)
      3. Connect the Aardvark adapter USB connector to the PC USB connector.
      4. Connect the Aardvark adapter I2C/SPI connector to the level shifter board ADAPTER connector as shown in Figure 7. On level shifter board install jumpers on TPWR, 1.8V, and MASTER.(?)
      5. Connect the level shifter board TARGET1 connector to the EEPROM socket board Aardvark1 connector as shown in Figure 8. On the EEPROM socket board install jumpers on VDD SOURCE: 5V, J3, and J4: 1&2. On EEPROM socket board install wires on (?):
        1. J6 – 1 to J5 – 1 (White, GND)
        2. J6 – 2 to J5 – 2 (Purple, GND)
        3. J6 – 3 to J5 – 3 (Blue, GND)
        4. J6 – 4 to J5 – 4 (Green, GND)
        5. J7 – 1 to J9 – SDA (Yellow)
        6. J7 – 2 to J9 – SCL (Orange)
        7. J7 – 3 to J5 – 5 (Red, GND)
        8. J7 – 4 to J10 – 1 (Brown, VDD)
      6. Launch Control Center. (?)
      7. Connect Control Center to the Aardvark adapter. (?)
        1. Click Configure Aardvark Adapter.
        2. Select the Aardvark Adapter.
        3. Click OK to connect to the adapter.
      8. Click Aardvark, and choose I2C+SPI.
      9. Click Aardvark, and enable I2C Pulls-Ups and Target Power. (This configuration is required for the level shifter board, and EEPROM socket board, but may not be required for all target systems.)
      10. Configure the adapter as an I2C Master using the I2C Control panel. (?)
        1. Click on the Master tab.
        2. Enter 800 in Bitrate rectangular, and click Set.
        3. Enter 0x50 in Slave Address field.(?)
        4. Disable 10 Bit Addr and No Stop.
      11. Write 0A 0B 0C to 24FC512 in memory address 00 08.
        1. Enter 00 08 0A 0B 0C in the Message field, and click Master Write.
      12. Read 0A 0B 0C from 24FC512 in memory address 00 08.
        1. Enter 0x0008 in Register Address
        2. Select 2 bytes in Address Width
        3. Enter 3 in Number of Data Bytes
        4. Click Master Register Read, and verify that the read data is 0A 0B 0C.

Figure 5: Aardvark Programs 24FC512

Figure 6: Programing System

Figure 7: Level Shifter Board

Figure 8: EEPROM Socket Board

Notes

For additional information, take a look at the Aardvark adapter user manual, Control Center user manual, level shifter board user manual, and EEPROM socket board user manual.