Hi All
I’ve got a problem which has got me really stumped.
I have been trying to battery protect an 128K RAM chip on my breadboard computer to effectively turn it into NV RAM. From my research, this should be very, very straightforward.
My breadboard computer runs just fine for hours, so appears to be pretty stable.
Having done a bit of research, I came across nonvolatile controller ICs and these looked to be just what I needed. Indeed, such ICs are used in the production of commercial NV RAMs.
I have written a basic monitor for my system, which includes a ‘lite’ xmodem based upload function, so I can populate chuncks of RAM with a nice big blocks of text. I'm only using the lower 57K of the ram chip in the system, so A16 is tied directly to ground.
I wired up a DS1210 NV controller and battery to my system, fired everything up loaded some text and powered off. After a few cycles, of this it was apparent that RAM contents do indeed persist – but usually only for a few tens of minutes.
After about 10-20mins (usually - This period can vary - sometimes RAM contents persist up to an hour) though, when I power up & check RAM, contents are ALL set to 0x00.
That's the entire 57K, except for memory used by my monitor program, set to 0x00!
If I disconnect the battery and operate the system, RAM contents are random on power up, just as one would expect. So I'm pretty sure I don't have some 'rogue set all RAM to 0x00' routine accidentally running at startup!
I have tried various configurations of the DS1210, changing the tolerance pin from VCCO to G to change the trigger voltage. I have tied the /chip enable in (/CEI) low and not connected /chip enable out(/CEO), so I only use the battery protect function and no RAM write control.
I have connected CEO to the AS6C1008 /CE, and also tried an inverted select signal to connect it to the CE2. I have used a different battery.
Whatever I do, I seem to get the same result.
So, I wondered if I have a duff DS1210 chip (bought from eBay from a UK seller).
So I ordered a Maxim DS1321 NV controller to test this hypothesis, wired it all up, and I have exactly the same behaviour.
I have even swapped out the original AS6C1008 RAM chip for an Hitachi HM628128LP - same behaviour.
The NV controller is obviously doing SOMETHING, as I’m getting zeroised RAM contents (i.e. 0x00) on power up instead of random contents.
With my MM ground lead at the RAM ground pin, when the system is powered up, the RAM VCC is at 4.7V. When I turn the system off, the RAM VCC is at 3V, as expected from the battery & DS1321. The DS1321 /CEO is at 3V, the battery warning is at 3.8V and the battery anode is at 3.3V. All as expected.
I leave it for 15 min, and contents are all 0x00, but voltages all seem OK still
I have built a few 8 bit breadboard computers in the past but I’m doing it to learn about electronics in my retirement. I'm therefore pretty much an electronics novice and I'm probably doing something stupid somewhere. Quite possibly something obvious to those more educated in electronics than I!
This system is all breadboarded. 5v is supplied from an old SONOS bridge mains adapter which I have used in the past. I have tried an alternative 5v adaptor and had the same results.
Given there is a time aspect here (and that time can vary), I'm wondering if it could be some kind of capacitance issue - something charging/discharging and causing an issue. a while after the system has shut down? But I can't even construct any form of hypothesis regarding WHAT sort of spike/wobbly/fault could cause the RAM contents to get so neatly set to 0x00???
I had to prove I had understood the DS1210 / DS 1321 datasheets properly, even though there are only 8 pins on the DS1210, so I wired up an Arduino Mega to the AS6C1008 RAM, connected up a DS1210 and wrote a short sketch to display RAM contents, and allow me to set RAM contents.
On this testbed, the AS6C1008 RAM has retained contents for 20 hours now, so it looks like that its working.
So that's a RAM chip AND NV controller from the original system, on a breadboard with an Arduino, and it all works as expected.
I’ve been struggling with this for over a fortnight, and I'm starting to get a bit frustrated, so any suggestions and/or pointers would be very welcome indeed!
Many thanks