Sunday, April 18, 2010

LED display progress...and problems

Today was a bit frustrating. I made some more progress on the LED display circuit, laid out here:
This circuit is designed to take the 4MHz clock coming off of the EDE707 and use it to drive a couple multiplexers and buffers (I ended up using a pair of 74LS12[56] chips instead of the 74F257). The intended waveform is shown at the top right. The CLK signal (a direct down-clock of the 4MHz) will be used to drive the LATCH pin of the EDE707. Qa will be used to select which set of inputs to use (address pins, or Qb/Qc/0/0). Qb and Qc will be used to drive the multiplexers so that the right part of the input shows up on the EDE707 inputs at the right time. Easy, right?

Here's what the program counter board looks like now:

Here's a front view with the various sockets/chips described.

So far so good, right? Well, not so much. After wiring up the 2:4 multiplexers and the quad tristates, the program counter board is now suffering from a bug such that all outputs are now held high all the time. No freaking idea why. I spent half an hour with a multimeter trying to find something resembling a short circuit, and couldn't find one.

I thought maybe it was some weird situation where a "high" output was wired to a "low" output and was thus causing a short, so I pulled all of the ICs out of the board. But even with no ICs in the board, it's still sending all of the outputs high. Which is even more bizarre, because the various output pins are isolated from each other (even more so with the ICs removed). So why would they all register +5v when the board is plugged in, even when there are no ICs in the board?

The other possibility is that my logic analyzer is no longer properly calibrated. I did notice that it said "default calibration settings loaded" the last time I booted it up.

So more research and debugging is to come. For now, however, I effectively have a paperweight that I spent a dozen hours to create. Lame.

Saturday, April 10, 2010

More progress on the program counter

Got some more wiring done today. At my last update, I had the "counter" part of the program counter done, but hadn't wired up the address pins of the EEPROMs. I've now cascaded the address pins to all three EEPROMs (32 wires, 64 solder joints) and also cascaded the address pins to a pair of 4052 dual 4:2 multiplexers. Why?
The multiplexers are part of a state machine that will be used to drive the EDE707, which I also added to the board today. The EDE707 is a pretty cool little chip -- it can drive 8x 7-seg LED displays using a microprocessor-style input. This is part of the "cool blinky lights" part of the project -- I want to have a 4-digit LED display of the current instruction. It'll be handy for debugging at slow clock speeds, and it'll look cool too!


The EDE707 runs at 4Mhz (that's the crystal sitting to the top-right of it). However, it's pretty pokey with respect to command inputs. To set the displays, you first setup a command on the four input pins (ex: 0010 for the third digit), then bounce the latch pin. Then you setup the value for that digit on the input pins, and bounce the latch pin again. Unfortunately, the datasheet says you have to leave the data active on the pins for 1.2ms (milliseconds!) after bouncing the latch. When your clock is running at 4Mhz (250ns), 1.2ms is an eternity.

The way I've decided to accommodate this is to build a simple state machine. The 4MHz clock first goes into a 12-stage ripple counter. This gets the clock pulses down to ~2ms between high-low transitions. This slower clock then goes into a 4-bit synchronous counter. The counter is used to run through a simple state machine:
  1. Counter: 0000: send 0000 (first digit) to the input pins
  2. Counter: 0001: send a0, a1, a2, a3 to the input pins
  3. Counter: 0010: send 0001 (second digit) to the input pins
  4. Counter: 0011: send a4, a5, a6, a7 to the input pins
  5. Counter: 0100: send 0010 (third digit) to the input pins
  6. Counter: 0101: send a8, a9, a10, a11 to the input pins
  7. Counter: 0110: send 0011 (fourth digit) to the input pins
  8. Counter: 0111: send a12, a13, a14, a15 to the input pins
As you can see, I can use the least-significant bit of the counter to drive a 2-input multiplexer that selects between a 4-bit piece of the address, or a command.

The commands can be driven directly from the counter -- the second and third bits are used to form the last two bits of the command.

Finally, the address information is formed by passing the address information through four 4:2 multiplexers, using the second and third bits of the counter as the selector.

When all said and done, each piece of the command takes about 2ms due to the many counter stages. Thus to get through all eight steps takes about 16ms. However, this still results in an effective polling rate of around 60Hz, which is much faster than the human eye can even perceive.

I've still got quite a bit of work to do before the program counter is done:
  1. Add the final multiplexer to drive the input pins of the EDE707
  2. Add the LED display and its driver transistors
  3. Finish wiring up the EEPROMs (I still haven't even run power and ground lines to them)
  4. Install the address load socket and wiring
  5. Install the current instruction sockets and wiring
...and then on to the shift/jump unit!

Monday, March 22, 2010

More photos

A couple more photos to show what things are looking like

Sunday, March 21, 2010

Counter is Counting...


I've reached one (of many) important milestones this evening: the program counter is now counting! It's surprising how much work it takes just to arrange four 4-bit counters and extract the resulting 16-bit address. But it's working! I've verified that the counter is able to count successfully from 0x0000 to 0xFFFF (65,536 for you decimal readers) without any missed bits or anything.

I went ahead and wired it up so that I have a 2x10-pin header that matches with my logic analyzer's termination adapters. That way it's simple to bring the ADDR signal into the analyzer as a trigger.

This accomplishment is important for a couple of reasons, because it proves a number of ideas that I will be using going forward:

  1. The buffers on the clock/control board can drive 4+ chips on an external board without any clock jitter or slew.
  2. I can pull 5V and GND through the 10-pin ribbon cableon the clock/control board without causing voltage sags or any latent current on GND.
I still have a lot of work to do on the program counter, though:
  1. Wire up the 7-segment displays and driver/decoder so that I have an address display that is always available.
  2. Wire up the ADDR LOAD pins and socket
  3. Wire up the EEPROMs and verify that 24-bit program data can be read successfully.
  4. Install two sets of buffers/line drivers for the program data
Frankly I'm not sure if I'm going to have enough real estate on the board for all this. But we'll see...stay tuned!

Wednesday, March 17, 2010

Back on track!

Hooray! I believe I've found the source of my problems. First off, there *was* a short on the board:

Notice the tin "whiskers" connecting the center pins to the pins directly to their right. Cleared those out, and I thought everything would be fine....

But it wasn't. So I pored over the whitepapers, ran Ohm's law calculations till my head started spinning, and finally went to bed really frustrated. But then I had an idea -- what if my problem isn't with the design at all? What if I was just over-driving my power supply?

My power supply is a cheapo Micronta 13.8V, 1.75A unregulated supply that I got at radio shack a zillion years ago. Could *that* be the problem?

So as an experiment, I wired up an Antec compute (regulated) power supply to the system. Bonus: computer power supplies have big fat 12v *and* 5v rails (24A on the 5v rails for my 500W supply!!). And wouldn't you know -- everything worked fine. The clock didn't get all wonky, and the program counter ticked just fine.

So next step: rip out all of my 7805s from the design and leave power generation and regulation to the power supply. I'm just going to solder in a standard Molex 4-pin power supply header to the control board, and distribute the 5V and 12V supplies like usual.

Sunday, March 14, 2010

Started on program counter

I've started working on the program counter. The sockets for the EEPROMs and the parallel load counters are all soldered in. I then prototyped the counters on my breadboard and all was well, but after soldering them up, there seems to be a short somewhere. The board is pulling almost 100mA @ 12v. To make matters worse, I blew the fuse in my multimeter while looking for the short. So...not a whole lot of progress this weekend. Once I get a new fuse, I'll keep hunting for that short. Could also be two outputs connected. Lots of pins to check. Pics of the new board to be posted soon.

Sunday, March 7, 2010

Program Counter Prototyping

I started prototyping the program counter, and ran into a bit of a jam. The 74161 synchronous counters that I ordered...looks like I inadvertently picked up the "S" version (74S161) which is rated at 80Mhz and draws a whopping 475mW at 5V. With four of them (for 16 bits) in parallel, I measured 2 ohms across the power leads:

V/R=I

5/2 = 2.5A

Yikes! My little 1A 7805 simply can't drive them. What I *wanted* was the 74LS161, which is rated at "only" 30Mhz, but uses a reasonable 35mW at full load.

I'm also considering running an unregulated 12V rail to each sub-board, so that if a sub-board needs more power than can be provided by the clock/control unit, a 12V rail is available for a 7805 to bolster the power capacity.