Close

Days 13 & 14: Just Keep Wiring

A project log for Detritus, the 8-bit ... computer?

I have a lot of random spare parts doing nothing and a need to make them do things...

jorj-bauerJorj Bauer 06/07/2017 at 00:460 Comments

... that's what we do, we wire.

Wire.

The OR and XOR were simple and straightforward. AND was a little more complicated, because I only have one quad AND gate; I substituted a quad NAND gate for the other 4 bits and used 4 of the inputs of a 7404 inverter. Another part I'm quickly running out of. I'm starting to think I might have to cross-wire back to the unused inverters in the 7404s lying around the board eventually; each one of these ICs has 6 inverters, and here I am using just a few in each instance.

Anway: back to the ALU. With the logic gates done, I'm left with the comparator and bit shifters. The comparator is a simple matter of wiring it up per datasheets. A little tedious but not difficult.

For the bit shifters: my plan is to use two bus drivers like this...

... The numbers 0-7 are the bits, 7 being the high bit and 0 being the low. Blue out to the bus, green in from the A register. 'X' are lines held at logical 0 (wired to ground).

When activated, the left gate winds up shifting 'A' right one bit and putting it back on the bus; while the right one winds up shifting left. (Perhaps I should put them in the other order, so the left one is shifting left. Hmm.)

But that got me thinking - two ICs to do pretty much the same thing? If I wanted to be clever, I could do this:

With just this one bus driver, I could rotate right from the bus to the A register (blue to green); or change the direction of the bus driver itself, and I'd rotate left from the A register to the bus (green to blue).

I never liked rotate instructions, though, and I'm definitely not in this to save on hardware. So I probably won't do that.

Probably.

Oh, and I found an error in my program counter! It happily counts in binary: 00000000; 00000001; 00000010; and so on up to 11110000; then 11110001; then 00000010. Or something like that.

Whoops.

Going to have to debug that. I've got a '163 counter that I found while re-inventorying my supplies, so I might pull out the '193 and use it in the 8x8 LED matrix display instead.

Discussions