Go Down

Topic: NVRAM corrupted on reset (Read 1 time) previous topic - next topic

bozgrul35

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



James C4S

Quote
So, I have connected my arduino digital pins to A0..A7, D0..D7,


Which arduino pins are you using?  All of them?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Senso

You need pull-ups or pull downs in the enable lines so they dont float when your arduino is reseted.

bozgrul35


Quote
So, I have connected my arduino digital pins to A0..A7, D0..D7,


Which arduino pins are you using?  All of them?


Hum, I don't understand your question. I've connected pins A0..A7 (memory) to
digital pins 22..29 (arduino), if I remember correctly (I don't have the board in front of me),
and D0..D7 (memory) to 30..37 (arduino).

bozgrul35


You need pull-ups or pull downs in the enable lines so they dont float when your arduino is reseted.

Thank you for your answer. Could you tell me...
- As the 3 enable lines are active low, I think my best shot is to use pull-ups, to set them inactive, am I correct? (I know it sounds like a silly question, but I'm really a newbie !)
- What enable lines should I pull-up ? Chip enable only ? Write enable ? Chip enable + Write enable ? All 3 enable lines (chip/output/write) ?
- What resistor value would you advise me to use ? It's a basic 5V set-up, with just a chip or two.

Go Up