Putting Memory in the MAG-85
Testing the Memory
To test the memory, we'll start with a simple program that produces a visible output. To do this, we'll take one of our LEDs that we used in free run testing to monitor an address line and connect it to the SOD output of the 8085:
- If you have buffered LEDs, disconnect the LED from 8085 A12 (pin 25) and connect it to 8085 SOD (pin 4).
- If you have bare LEDs with current limiting resistors connecting to the 8085's address lines, move the resistor connected to 8085 A12 (pin 25) to 8085 SOD (pin 4).
The SOD output is a software-controlled output line of the 8085. It's one of the most useful features of the 8085. It's often used for serial communications output, but it has also been used in a variety of other ways. For now, we'll use it as a programmable output to let us see that the 8085 is doing what we program it to do.
Our First Program
The first program is four bytes long. Thanks to the fact that the memory is non-volatile, you can put the program into it outsite the MAG-85, then plug it into the MAG-85 (while power is off!), power up the MAG-85 and run the program. To put the program in the memory, you can use a device programmer or you can set up a breadboard fixture to put these four bytes into the first four memory locations (all numbers in hexadecimal):
Memory Location Byte Operand
0000 3E MVI A, 0xC0
0002 30 SIM
0003 76 HLT
The program loads a value into the A register of the 8085 that will enable the SOD output, and tell it to go high (that's the 0xC0). Then we execute a SIM instruction which actually does this. This should light up the LED connected to SOD. Then we stop, since we're done and we don't want the 8085 to keep going and try to execute what might be garbage instructions in the rest of the RAM.
Once you program the RAM, put it into the MAG-85, and power it on. If the program doesn't run, first try to /RESET the system by grounding the /RESET line of the 8085 then pulling it back to 5V. I put /RESET on a switch that goes between ground and 5V at this point, myself. I have the switch at ground when I power up the system, then switch it to 5V once the system is on to start the program. (We'll add a real RESET circuit in the next step.)
If all is well, the SOD LED should come on almost immediately. If it doesn't, power off the system and check the connections. Also, check to make sure your program has been properly entered into the RAM.