25LC040 EEPROM Slave Address Question


I am new to serial communication protocols and I am currently trying to read and write to an external 25LC040 EEPROM using the MSP432 launchpad. However, I am not sure how to properly connect these two devices. From the MSP432 technical manual, I need the I2C slave address of the external device, but I can’t seem to find it in the 25LC040 datasheet.

Can someone please help? Also, where can I find sample code on how to communicate with external devices using the MSP432?


Since 25LC040 can be accessed via 4-wire SPI(CS/SO/SI/SCK), you have to set some multifunctional pins of MSP432 into SPI mode. But I can’t find example code for 4-wire SPI configuration.

Can anyone provide a example code?

1 Like

Microchip AN1235 - Using C to Interface Texas Instruments’ MSP430XXXX MCUs with SPI Serial EEPROMs may help.

This note offers designers a set of examples for the read and write functions for the Microchip SPI Serial EEPROM using GPIO pins to simulate the SPI bus.


Thanks so much, everyone! I will check these sources out. Also, I was recently told that the 25LC040 has no slave address.

Hi Fish6,

A microcontroller communicates with SPI based EEPROMs, such as the 25LC040, by pulling the Chip Select pin low. If there is more than one SPI EEPROM on the bus, the microcontroller must use a separate Chip Select pin for each EEPROM. Since the Chip Select pin already defines which EEPROM is being selected with the SPI protocol, there is no need for an address.

Conversely, with I2C based EEPROMs, such as the 24LC04, there is no Chip Select pin, so they do require an address to define which device on the bus is being selected.