Student replaces obsolete memories with PIC32 MCU

-June 21, 2013

In May I received an email from Jim Carroll, a computer-science student at Florida Gulf Coast University. Jim wanted to rebuild or replicate a small computer called the "Mark-8" I designed in the early 1970s. He got to the point of creating the memory section and discovered the Intel 1101 memories (256-by-one bit) had gone obsolete many years ago. Obsolete-component companies might have some 1101 ICs, but at prices that put them well outside Jim's budget. So he asked if I had ideas about how to substitute newer memory ICs.

I thought about adapting inexpensive standard read-write memories (SRAM) because a few of them would cover the Mark-8's entire 16 kbyte address space. Unfortunately, the computer design uses split data busesa bus for data input and a separate bus for data output. Thus, a retrofit memory design would need extra ICs to split the bidirectional data bus on modern memory ICs and the ICs would need to provide and accept standard 5V TTL signals. I sent Jim a schematic diagram that showed a 2 kbyte memory IC, two bus buffers, and a bit of glue logic.

As Jim and I exchanged email messages, we realized a better solution must exist. Current microcontrollers (MCUs) provide many I/O pins and lots of SRAM, so could we substitute one for the entire memory, buffers, and logic? A few assembly-language instructions just might do the job. First, the MCU would need 14 inputs for the memory-address bits. Second, it would need eight inputs for memory data, and third, it would need eight outputs for data saved in memory. Finally, the MCU would need one I/O or interrupt input for the memory read/write signal. Those requirements sum to 31 I/O pins.

A search for an MCU took quite a while and yielded only a few choices that would provide all the needed I/O and memory Jim's reconstruction needed. But instead of working through more searches I looked in my lab for an MCU board that could operate as a proof-of-concept unit. After I looked at specs for MCU boards on hand I settled on the Digilent chipKIT Max32 that gave me a Microchip PIC32MX795F512L with 128 kbytes of SRAM and as many as 83 I/O ports. And many of those I/O pins can accept 5V logic signals. Add a pull-up resistor and configure then with open-drain outputs and they can provide 5V TTL logic signals.  So far, so good.

Software for the PIC32 MC would continuously accept a 14-bit address and use it to address SRAM. The byte of data at that location would get put on the data-output pins. When the MCU detected a write pulse, it would take the byte from the data-input pins and put it in the addressed location. Then it would place that byte on the data-output pins. The PIC32MX data book makes it seem like a pain to work directly with PIC32 registers and SRAM, but an array of bytes might do the job. Let the C compiler handle the details. (Digilent provides a free IDE that uses an Arduino-like format.)

Over the past weekend I ran several tests with a short C-language program that performed the steps explained above. Instead of using an interrupt, I used an I/O pin to monitor the read/write signal. (I use interrupts as a last resort.) The results showed the MCU responded to the negative-going edge of the read/write signal in about 300 nsec, which should mean no difficulties for the Intel 8008 MCU that has a 20 μsec cycle time. Jim performed other timing tests with a Digilent Uno32 board and got good results with that board, too. I suppose Jim and I could look at the assembly-language listing and do some optimizing, but the timing should work with what we have.

This memory-substitution worked well as far as we have tested it. I'll send Jim my Max32 board so he can try it with the Mark-8 circuits he has built. The Digilent chipKIT Max32 board costs $49.50, which seems like a small price to pay when I consider the time needed to hand wire individual memory chips, buffers, and logic, install this circuitry, and test it. Another win for a microcontroller.

Also see:

Loading comments...

Write a Comment

To comment please Log In