SPI Serial EEPROM design

Apr 20, 2005 12 Replies

Hello:



I'm starting up a new desing using 4 Atmel AT25HP512 devices connected to a 4 wire SPI interface.



My question is does anyone have an over view (pseudo code) of hew to Initialize Read Write Enable Write



These devices. I've got all the C code writen but I'm missing something



Thanks In Advance. George



Doesn't the data sheet explain it?

I'm using Atmel IIC EEPROMs at the moment, so I don't have the SPI version data sheets handy, but the last time I used Atmel SPI EEPROMs, the data sheet explained exactly what you needed to do.

Grant Edwards grante Yow! "THE LITTLE PINK at FLESH SISTERS," I saw them visi.com at th' FLUROESCENT BULB MAKERS CONVENTION...

It helps to have a logic analyzer hooked up so that you can check your signals against the datasheet.

A 4-channel digital scope will works just as well. A 2-channel scope is a bit more cumbersome, but will do in a pinch.

Grant Edwards grante Yow! I wonder if I ought at to tell them about my visi.com PREVIOUS LIFE as a COMPLETE STRANGER?

Well I'm more stuck in how to unlock the device. It powers up with writes disabled. I've read the data sheets and it metions that I need to set the control register and issue a write enable command. But the details are vague. And the order of these in not at all clear.

These are relative new devices so perhaps I should look at the previous versions data sheet for clues.

george

SST have similar SPI parts.

SST25xxxx

There is example C code commands available from

formatting link

Here's the driver

formatting link

JG

Also check out

formatting link

1) make sure you have the /WP pin pulled or strapped to VCC. 2) send WRSR,0 to enable writing to all blocks (BP0,1). 3) send the WREN instruction. that sets the WEN bit in the status reg.

you can read the status reg to see if is setup correctly. BP0,1 should all be low to write-enable all blocks. WEN should be high to enable writing.

Hope that helps.

- Richard

Forgive me for being slightly off topic but have you not thought about replacing the eeprom with serial flash ?

Regtards Spen

These EEPROMs store system information and are constantly changing. So I need the 100K writes of EEPROM.

What is Serail FLASH???

george

I think I'm doing this but...

To write enable the devices, should I do a WREN (write enable 8 bit command) then WRSR (write Status Reg 16 bit command) or in the opposite order?

I don't always see the WEN bit set in the statyus registers????????? Some days yes today no.

I can see the status going busy after the above sequence.

I read all ones.

THanks george

If you need lots of frequent updates, you might investigate the SPI Ferro-Electric RAM (FRAM) from RAMTRON.

Mark Borgerson

I found my problem. THis device only supports 128 byte writes. One needs to get to a 128 byte boundary and then send 128 bytes of data. Unsent bytes will be undefined.

Actually Atmel support guided me through all this. Good Job Atmel.

And thanks to all who replied.

gm

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required