Hello,
I'm using a 1Mbit NVRAM ZEROPOWER (
http://fr.farnell.com/jsp/search/productdetail.jsp?SKU=1218170) as a ROM replacement
for a 8-bit CPU project.
I'd like to program it with my arduino mega.
For the time being, I only use the 256 first bytes of the memory (A7+ are connected to ground).
So, I have connected my arduino digital pins to A0..A7, D0..D7, Chip Enable, Output Enable and Write Enable (whatever
their name).
I have written a simple sketch, that stores X in address X, for X in 0..255. And then reads the memory, to check that the values
are ok. Then, I change the sketch to disable writing, and only read the memory and do the check part.
The problem is : after an arduino's reset, a few bytes are altered. After several resets, a lot of bytes are altered.
Sometimes, a value comes back OK after being wrong for several resets, which puzzles me... or maybe it is just a single bit that got back to its original value.
I think maybe the NVRAM inputs (the arduino's outputs) are unstable during the reset time, and so the Write pin gets enabled and the memory is written.
I've wired the Write pin to VCC : the content of memory isn't altered anymore after any RESET, so I definitely think that the
problem is here.
I'm a newbie in electronics, so I need some advice, because:
- I'd like to be able to program this NVRAM with the arduino
- and then, use it like a ROM/RAM for my 8-bit microprocessor
The datasheet tells to use:
- a 0.1 µF capa. between VCC and VSS
- a 1N5817 diode between VCC and VSS
I've only tested with the capa, which leads to massive data corruption. I didn't test the diode, I have to look for one.
I've tried with a 0.1 µF cap between VCC and Write pin : it works far better, just a single byte gets corrupted
once in a while. But it's not OK, I need it to work all the time and never get corrupted.
Any idea ?
Thanks.
Boz