Sign in to follow this  
Followers 0
systems_glitch

Building an 8085-based Computer

12 posts in this topic

I've wanted to build my own computer, from the ground up, ever since I found out about the Altair 8800 and the IMSAI 8080 of the 70's. Having found an 8085 CPU in an old AT&T PBX module, given to me by a teacher in middle school, I'd decided that would be the processor I'd use, when I eventually got around to building one. It's binary-compatible with the 8080, but requires only a single supply, a crystal, and an address latch to operate (the 8080 requires three supplies, a system controller IC, and a clock generator IC). I decided to get started with PIC microcontrollers, rather than going straight into CISC assembly, during high school, and found that the PIC was able to do what I needed for my projects with fewer parts and less power draw. It was also easy to get code to it, using a homemade parallel port programmer (I didn't have, or have access to, an EPROM eraser and burner at the time).

Recently, though, I've found a few situations in which I'd like to have a microcontroller system with a true address and data bus, rather than implementing them through the larger PICs' output ports. I decided it was finally time to put together a basic 8085 system, since I'd now accumulated many 8085 CPUs, plenty of static RAM, and had acquired my own EPROM burner. This is the result:

post-2713-1264874303_thumb.jpg

I built my prototype for the project on a Vero project board, which contains traces oriented for DIP ICs, as well as power and ground planes. I started off with just the 8085, a 74LS373 8-bit latch for the multiplexed address bus, a 2716 2k x 8 EPROM, a 2 MHz crystal and some decoupling capacitors. I later added the small, red TIL311 hex display, and a 74LS04 hex inverter to supply its internal latch with a signal of correct polarity. The EPROM was wired directly to the data and address buses, with its Chip Enable tied to the Read output of the CPU, since there were no other memory devices present. The TIL311 was wired directly to the low 4 bits of the data bus, with its noninverting Latch Enable fed from the CPU's inverted Write line, through one of the inverters in the 74LS04. I wrote a short assembly program to output 0x0A on output port #0 (any port would work, as the TIL311 responded to any write from the CPU). The program was assembled using GNUSim8085 (an open-source 8085 assembler and simulator), tested, then the hex dump was manually entered into my Intel iUP-201 PROM programmer, which has a keyboard for the manual entry of hex data into a PROM. After fixing two swapped address lines, the program worked fine, and displayed "A" on the TIL311.

The next step was to add some RAM, for use as the 8085's stack, and for general storage of variables. I chose two uPD-2114 RAMs, which are 1k x 4 static RAMs -- you parallel two for 1k x 8. Since there was going to be real RAM and ROM present, it was necessary to come up with select logic to choose the EPROM or the RAM when memory accesses were performed, or the TIL311 when IO accesses happened. The 8085 provides IO/M, RD, and WR status lines, with M, RD, and WR being inverted (IO/M is one line, with 1 = IO access, and 0 = Memory access). The select logic was composed of inverters and NAND gates, from the 74LS04 and 74LS08 ICs. During this modification, I decided to add a PDSP-1881 8-character LED display for ASCII output. This was added to be activated on output ports 0-7 (one port for each character). Finally, I wrote an assembly to push "HELO" onto the system stack, then pop each character off and display it on an incremented output port. After correcting a timing error (the PSDP-1881 wasn't syncing with the 8085's clock), "HELO" appeared on the display after reset:

post-2713-126487431545_thumb.jpg

Here's a shot of the point-to-point wiring on the back of the board. It's 30-gauge Kynar wrapping wire:

post-2713-126487432608_thumb.jpg

I'll probably keep this board as-is for future embedded projects, but I plan on building a more complete system using an Augat wire-wrap board, since the point-to-point hand wiring is somewhat tedious. I've got an electric wire wrap gun for this purpose, and several different lengths of precut wrapping wire for this purpose. I'll probably add either an HD44780-based LCD or a serial UART next, with the intent of writing a small monitor program for the system. Eventually, I'd like to be able to load CP/M from ROM or perhaps floppy disk on the system.

If anyone is interested, I can post scans of my schematics, notes, and assembly code for this project. I've also got a pile of extra components, if anyone would like to build an 8085 system similar to this one. If one were to use the same memory map, code should be interchangeable between systems. If you'd like to build something like this, but lack a PROM burner, I could post my schematic for a manual programmer I built several years ago: you manually set the address and data bits, then trigger a 555 timer to provide the programming voltage pulse to the EPROM without damaging it.

2

Share this post


Link to post
Share on other sites

Very nice! I'm taking a class on embedded systems right now and we were given (paid for with non-optional lab fees) Motorola 9s12 prototyping boards. While nothing we do in the class is going to be very complicated (the hardest being an led "traffic light"), I have my own plans for the micro-controller. I'll start off small but would like to learn to output images in a format I can view on my tv, and write some little games for it.

0

Share this post


Link to post
Share on other sites

Damn, that's alot of silver wire, and that shit ain't cheap.

-1

Share this post


Link to post
Share on other sites
If anyone is interested, I can post scans of my schematics, notes, and assembly code for this project

This project has inspired me :)

Please post them :)

0

Share this post


Link to post
Share on other sites

I've been using this board a lot lately in prototying and troubleshooting, so I decided to lay it out as a real PC board in EAGLE. I managed to squeeze the 8085, address demultiplexing, an 8K RAM, 8K ROM, address decode, and reset circuitry onto the EAGLE free version's 4x3 PC board limit, double sided. I also added a 40-pin connector on the bottom edge, which contains the multiplexed data/address bus, the high address bus, interrupts, power, clock, et c. This would allow someone to add an "application" board either through a stacking 40-pin connector or a 40-pin IDE cable, so that the board could be unplugged and used for other projects. You can also use a right-angle 40-pin header and plug it into a backplane, if one were so inclined.

The board is being sent off with our next batch of prototypes for work. Depending on how well it works, I may order more. If anyone is interested, I could offer bare boards up for sale, or kits. I'll probably be releasing everything as some form of open hardware...I'm currently trying to decide what license to use, since I don't want to end up restricting its use by accident. Assuming the board works well, I'll probably be adding a serial interface board, with a small monitor in ROM and the ability to load code from a terminal directly into RAM. More information to follow!

0

Share this post


Link to post
Share on other sites

Well, of course there were complications getting the boards out. The people who do our prototypes couldn't work with the raw files we sent them. Then they couldn't stitch the Gerber output files together, and wanted an extra $50 to send it somewhere to have that done. In the end, I gave up and started setting aside a little money to order the board myself. I ended up going with PCB-Pool, who was cheaper than BatchPCB and takes Eagle CAD files directly. This is what I got in the mail today:

post-2713-067762400 1283391544_thumb.jpgpost-2713-052015600 1283391556_thumb.jpg

Sockets and discrete components added next:

post-2713-038728700 1283391615_thumb.jpg

These include the oscillator crystal and its capacitor (lower left), the reset circuit (capacitor, resistor, diode and tact switch in the upper left), the tantalum capacitor serving as main power supply bypass (silver tube top center), and the smaller 0.1 uF bypasses scattered around the board (blue-green beads). There's also a 1Kohm x 5 resistor pack near the bottom of the board, and this holds various interrupt/hold lines down.

post-2713-030179200 1283391643_thumb.jpg

Then the sockets get stuffed with various ICs. The big one is, of course, the Intel 8085. This particular 8085 is the "A" revision, but an actual Intel part. The first IC above the 8085 is a 74LS138, which decodes the top three address bits into 8 select lines for memory devices -- the first two outputs are mapped to the ROM and RAM. The 74LS138 also depends on the 8085's Memory-I/O status line, which keeps the memory devices from responding during an I/O read/write. The IC above that is a 74LS14 Schmitt hex inverter, which forms part of the reset circuit.

The reset circuit itself bears mentioning, as it is simple but effective. It consists of a capacitor, charge resistor, shunt diode and the tact pushbutton. On power-up, the capacitor is discharged due to the diode, so the system is put in reset. It charges through a 10K resistor, allowing for a nice, wide reset pulse. It serves double-duty though, because the tact switch in the circuit will also shunt the capacitor's charge to ground when it closes, so it provides both power-up reset and debouncing/proper pulse width for the reset pushbutton.

The final small IC is the 74LS573, which is an 8-bit-wide latch. This is needed to latch the multiplexed low address bits off of the address/data bus.

post-2713-098475500 1283391670_thumb.jpg

Finally, the RAM and ROM go in. The ROM socket will accept either 2764 or 27128 ROMs, but will only use the first 8K (address pin 13 [NC on the 2764] is tied to ground). I loaded the ROM with a short routine, written in Assembly, to flash a LED on the SOD pin of the 8085:

;Flash a LED on SOD
;Does not use RAM

FLASH: MVI A, 0C0h
SIM
LXI H, BACK
JMP DELAY
BACK: MVI A, 40h
SIM
LXI H, FLASH
JMP DELAY
JMP FLASH

;Delay, return to HL when done.
DELAY: MVI A, 0FFh
MOV B, A
PT1: DCR A
PT2: DCR B
JNZ PT2
CPI 00h
JNZ PT1
PCHL

The code was first assembled using gnuSim8085, then tested on the original point-to-point prototype, so I knew the code was good. Fortunately, it worked right-off in the new PCB version:

An overly complicated oscillator!

Edited by systems_glitch
0

Share this post


Link to post
Share on other sites

Yes, that may be over complicated, but it's really cool.

How hard would it be to build a daughter board for it to accept a bunch of input and outputs?

0

Share this post


Link to post
Share on other sites

Yes, that may be over complicated, but it's really cool.

How hard would it be to build a daughter board for it to accept a bunch of input and outputs?

Fairly trivial -- that will probably be the first board I build with EAGLE once I prototype it. Probably I'll use an Intel 8255-compatible peripheral interface IC, which provides three 8-bit I/O ports. I'll bring the I/O ports out onto headers of some sort...IDC, or maybe 16-pin DIP cables for those DIP-socket ribbon cables (they plug directly into a .3" spacing breadboard just fine...I did this with my homebrew PIC development board). With stacking IDC connectors, the I/O board would plug right on top or under the processor board, sort of like a PC/104 stack.

Probably the next thing I'll do will be to interface some of the LED ASCII displays I have with the board. I've got some really neat 5x7 dot matrix modules I want to play with. I also want to develop a board with a serial USART and basic ROM monitor so I can dump code directly from my serial terminal into RAM and go, but that will probably come much later.

0

Share this post


Link to post
Share on other sites

+1

awesome

now you just gotta get it to do something overcomplicated XD

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0