Writing to a parallel EEPROM

Got a hardware problem? ask for help

Writing to a parallel EEPROM

Postby QuinnDunki » January 13th, 2012, 7:54 pm

Hey Hackaday!

I come to you, hat in hand. I've hit a wall on my Veronica project, and no amount of googling or researching or experimenting is helping anymore.

I have an Atmel AT28C256 32k x 8 parallel EEPROM (data sheet: http://www.jameco.com/Jameco/Products/P ... 4843AT.pdf ). I am trying to write to it, but nothing I do seems to work. The datasheet says it works just like an SRAM, but my circuit which writes correctly to SRAMs has no effect on the EEPROM.

Take the simplest possible test, for example:

1) Hook up Vcc and ground on the EEPROM
2) Tie all address and data lines to ground
3) Tie /CE low, /OE high, and /WE high
4) Briefly touch /WE to low, then back to high.

I expect this to write 0x00 to address 0x0000. On the SRAM, that is what happens. On the EEPROM, I get 0xFF (the factory default value) back. I've tried everything I can think of, but I cannot get any byte to write anywhere into this thing. I've tried four different chips, thinking one might be bad. I also tried disabling the Software Write Lock, per the datasheet, even though it is supposed to be disabled from the factory. All four chips were purchased new from Jameco.

The above 4-step test works on an SRAM just fine, so I'm skeptical of the datasheet's claim that the EEPROM is written to the same way. I'm intentionally avoiding the page-write mode by only writing a single byte, to eliminate variables.

Any and all suggestions would be much appreciated. I'm completely out of ideas on what might be wrong. It must be something silly, because the datasheet makes it sound very simple to use this thing. I have a couple of new chips en route from another source, but that's a long shot. I can't believe all four of the ones I got are bad?

:?

-Quinn
User avatar
QuinnDunki
 
Posts: 4
Joined: January 13th, 2012, 7:28 pm

Re: Writing to a parallel EEPROM

Postby k-ww » January 13th, 2012, 8:12 pm

Reminds me of the fun I had with the Z80 back in the mid-70's.

Are you using a debounced pulse circuit to generate your WE* pulse?
[two cross-coupled nand gates with the psuhbutton nC to one of the free inputs and the NO to the other, the common grounded, and 10K pullup resistors on both inputs]

Also - do you have a pullup resistor to +5 on the WE* pin - 10K or smaller - it's cmos, and dosn't go high by itself.

The spec sheet calls out that the chip ignores writes if they are les than 15Nsec - if you are touching WE* low by hand, this may be interpreited as a noise glitch.

Also, do you have a bypass cap across the chip?

Finally, if you are doing this with your micro, the EEPROM takes several Msec to write a byte into the chip after the WE* - thats why they have the data polling information - you have to look for the data on D7 to go from the compliment of what you wrote back to the actual bit value before you write the next byte [Page mode lets you write up to 64 bytes in the same 64 byte page [having the same upper adddress bits], before you have to wait for the data to be written into the chip.

One final bit of sillyness - you have to ground OE* if you expect to see data out of the chip [after bringing WR* high]
User avatar
k-ww
 
Posts: 1286
Joined: February 17th, 2011, 10:47 am

Re: Writing to a parallel EEPROM

Postby QuinnDunki » January 13th, 2012, 8:31 pm

Thanks for the reply!

k-ww wrote:Reminds me of the fun I had with the Z80 back in the mid-70's. Are you using a debounced pulse circuit to generate your WE* pulse?
[two cross-coupled nand gates with the psuhbutton nC to one of the free inputs and the NO to the other, the common grounded, and 10K pullup resistors on both inputs]

Not for this test, but I can simply hold it for an extended period, to guarantee the pulse. I've also tested it with my programming circuit, which generates known good pulses that work on an SRAM.
k-ww wrote:Also - do you have a pullup resistor to +5 on the WE* pin - 10K or smaller - it's cmos, and dosn't go high by itself.

No inputs have been left floating.
k-ww wrote:The spec sheet calls out that the chip ignores writes if they are les than 15Nsec - if you are touching WE* low by hand, this may be interpreited as a noise glitch.

See above, regarding extended pulse, and test with programming circuit.
k-ww wrote:Also, do you have a bypass cap across the chip?

Yup.
k-ww wrote:Finally, if you are doing this with your micro, the EEPROM takes several Msec to write a byte into the chip after the WE* - thats why they have the data polling information - you have to look for the data on D7 to go from the compliment of what you wrote back to the actual bit value before you write the next byte [Page mode lets you write up to 64 bytes in the same 64 byte page [having the same upper adddress bits], before you have to wait for the data to be written into the chip.

For this test, I'm only writing a single byte, and I wait at least a full second before touching anything.
k-ww wrote:One final bit of sillyness - you have to ground OE* if you expect to see data out of the chip [after bringing WR* high]

Yup. The data reads back just fine, except that it's always 0xFF. If I forget to bring /OE back low, I can tell because the data lines are all high-Z.
User avatar
QuinnDunki
 
Posts: 4
Joined: January 13th, 2012, 7:28 pm

Re: Writing to a parallel EEPROM

Postby k-ww » January 13th, 2012, 8:38 pm

One additional thought - raise CE* also - The chip may need the edges of both CS* & CE* going from high to low to trigger a read cycle.

The timing example for polling bit 7 shows both going high & low to read the inverted bit 7 busy / done.
User avatar
k-ww
 
Posts: 1286
Joined: February 17th, 2011, 10:47 am

Re: Writing to a parallel EEPROM

Postby QuinnDunki » January 13th, 2012, 9:08 pm

k-ww wrote:One additional thought - raise CE* also - The chip may need the edges of both CS* & CE* going from high to low to trigger a read cycle.

The timing example for polling bit 7 shows both going high & low to read the inverted bit 7 busy / done.

I had that same thought. The data sheet is a bit vague on whether both /CE and /WE need rising edges to latch the data. Sadly, I did try that to no avail. I really appreciate your suggestions though!
User avatar
QuinnDunki
 
Posts: 4
Joined: January 13th, 2012, 7:28 pm

Re: Writing to a parallel EEPROM

Postby Osgeld » January 13th, 2012, 10:02 pm

oh I really hope you get this worked out, I have the exact same part in the mail (for a i8032 system)
User avatar
Osgeld
 
Posts: 725
Joined: January 25th, 2011, 6:16 pm

Re: Writing to a parallel EEPROM

Postby k-ww » January 14th, 2012, 3:39 am

Please try this exact sequence:

1) power up chip with all control lines high [CS*,OE*,WR*]

2) drive address lines low, let data lines float. [via resistors to +5]

3) drop CS*, drop OE*, read data, raise OE*, raise CS*, wait 1 -100 usec

4) pull D7 high with resistor, drive D0-D6 low, drive CS* low, drive WR* low for 1 - 5 usec, drive CS* high at same time as WR*, wait 1 - 100 usec.

5) let data line float with resistor pullups, drive CS* low, drive OE* low, look at data after more than 1 usec.

6) drive OE* high, drive CS* high, wait 1-100 usec

7) repeat 5 & 6 over at least a 50 msec period.

8) if this wrote data into chip, the first time you did 5 & 6, you should have seen D7 low [busy writing], and then at some point it should have changed back to high, with D0-D6 going low [during the read cycle].
Also, bit D6 should be toggling between high & low until the write cycle is done.

9) a finer reading & interpriting of the spec sheet tells me that the write protect/unprotect sequence needs the same 10msec to change the protect state because it is an eeprom bit, so you should see bit 6 doing the same as for a write cycle.

10) when you do the write lock/unlock sequence, you should also be doing the rasing of CS* as well as WR* for each step.

11) Take heart, when you have solved this, you will laugh at how silly the reason was for the problem.
User avatar
k-ww
 
Posts: 1286
Joined: February 17th, 2011, 10:47 am

Re: Writing to a parallel EEPROM

Postby QuinnDunki » January 19th, 2012, 8:57 pm

Hey everyone- just thought I'd update this to close out the thread. After many hours, I finally got this working. It turns out, in fact, all four of the EEPROMs in the first batch I purchased were bad. Two new ones purchased from another source worked perfectly with my existing circuits. Just goes to show, sometimes the thing you can't believe is the problem is the problem.

Thanks for everyone's help!

EDIT: The final in-system programmer that I've built will be detailed on my project site soon, so stay tuned!
http://www.quinndunki.com/blondihacks
User avatar
QuinnDunki
 
Posts: 4
Joined: January 13th, 2012, 7:28 pm

Re: Writing to a parallel EEPROM

Postby mvk » June 12th, 2017, 11:21 am

This might interest you, or future googlers.

I had, what seems like, the same problem and found this old thread.
- Batch of at28c256 from ebay, apparently locked, only reading FF.
- Couldn't write with Arduino
- Friend with a "good" programmer could program
- But after that they were still locked/unchangable for the Arduino

If your Arduino software is/was based on the MEEPROMMER, then there seems to be a latent bug in there causes exactly this if you use it to implement the 6-byte unlock sequence from the datasheet. See details and solution below:

https://github.com/mkeller0815/MEEPROMMER/issues/6
mvk
 
Posts: 1
Joined: June 12th, 2017, 11:16 am


Return to Help me! Hardware

Who is online

Users browsing this forum: Bing [Bot] and 3 guests