Real Memory, Real Programs
Using my principle of keeping the IC count to a minimum, I decided to use a non-volatile RAM chip as the only memory in this system. This choice involves a certain amount of risk. Like wiping all of the system's memory with a single bad instruction. I feel there are ways of dealing with this, however. Likewise, having more than one chip adds the need for select and enable logic for the chips. The reduction in board space that I'll get from only having one memory will be worth the potential problems, I feel.
The fact that the RAM doesn't go *poof* when power goes off means that it can serve the role of both RAM and ROM. It also means the system gets an automatic "suspend" mode. The specific chip I selected was based on the need for non-volatility, simplicity, and the size of memory I thought would be comfortable for a simple machine-language based system. Anything from 4K to 16K would have been enough for me, I felt, since I expect system code to occupy about 2K, leaving about 2K for user applications.
As it happened I had a parts drawer filled with 8Kx8 NOVRAMs that I'd pulled from scrapped SCSI interface boards some years ago. These chips are rated to be good for 10 years. The dates on them range from 1989 to 1994, so they're all past their rated expiration date. Fortunately, all but two tested out as good (and it wasn't the oldest ones that failed.)
The chips are a mix of Dallas DS1225Y-170s and Benchmarq bq4010YMA-200s, which are functionally equivalent==the difference in speed being insignificant for an 8085 at clock speeds up to 6MHz. If all the pulls I have happen to go belly-up on me, new manufacture replacements are still available. They use a standard JEDEC memory pinout, so if I wished I could replace them with a standard RAM and add an external battery to make it non-volatile.
Interfacing the RAM
Wiring up the RAM is pretty straightforward:
(You can click on the image at the top of the page to see a close-up of my circuit.)
- Remove the resistors connected to AD0-7 on the 8085 (pins 12-19.)
- Connect the RAM Vss (pin 14) to Ground
- Connect RAM Vcc (pin 28) to 5V.
- Connect RAM /WE (pin 27) to 8085 /WR (pin 31).
- Connect a 4.7K ohm resistor from RAM /WR (pin 27) to 5V.
- Connect a 4.7K ohm resistor from RAM /OE (pin 22) to 5V.
- Connect RAM /OE (pin 22) to 8085 /RD (pin 32).
- Connect RAM /CE (pin 20) to 8085 IO/M (pin 34).
- Connect RAM DQ0-7 (pins 11,12,13,15,16,17,18,19) to 8085 AD0-7 (pins 12, 13, 14, 15, 16, 17, 18, 19)
- Connect RAM A0-A7 (pins 10, 9, 8, 7, 6, 5, 4, 3) to address latch A0-A7 (pins 2, 5, 6, 9, 12, 15, 16, 19).
- Connect RAM A8-12 (pins 25, 24, 21, 23, 2) to 8085 A8-12 (pins 21, 22, 23, 24, 25).
Carefully check your connections, especially the address lines through the latch. When I first connected my RAM, I had a couple of address lines on the latch swapped. Somehow, my first program still ran, even though it was only four bytes long one of the address lines it was using was one of the incorrect ones. My second did not, however. It took me half an hour to figure out why.