Electronic – Bus enable integrated circuit

buscpuintegrated-circuit

I am toying with designing a simple 8-bit CPU out of basic logic components. I have a fairly good idea of how my ALU and registers will interact, but the one thing I feel can use some improvement is how to toggle when a line is allowed to connect to the main data bus.

My initial thought was to use and gates to drive the bus. The output from the various lines in the ALU could all go into a set of quad-AND chips that output onto the bus. Only one set of AND gates at a time would have all of its B inputs pulled high to let it out onto the bus.

A couple of things I am unsure about: It seems wasteful to use eight full AND gates per line, when I only need one control line going in. Is there a better chip more suited to this purpose? I'm sure I could also do it with eight transistors, but I would like to stick with fairly common (and cheap) ICs.

A solution like this only lets data flow one way from the bus. Is this a problem? I think not, since I have other control lines stopping registers from loading the bus data until I want them to.

Is there a standard chip to use for a bus gate like this?

Best Answer

The 74HC244 is the typical device for connecting to/disconnecting from a bus. It's an octal tri-state buffer (or rather a dual quad buffer). You'll need the tri-state feature to disconnect completely from the bus. The gates would set the bus high or low, but that wouldn't allow another device on it.

But since you're talking about a data bus you probably want a bidirectional buffer. Then you can use the 74HC245.

74HC245

You have a DIR pin to control the direction and a /OE which can make the buffer tri-state.

edit
JustJeff mentions the 74HC374 octal tri-state D flip-flop. (Note: I'll talk about the 74HC574, which is functionally the same, but has a more logical pinout.) The 74HC574 is indeed an interesting part, and a classic since the SN74xx series. While the 74HC245 will give you a tri-state buffer, the 74HC574 has a memory function too, in the form of an octal D flip-flop. Great to make registers, and through the tri-state connection to the bus you can route your data flow easily.
There's a drawback to this, however. The register's output is only available to the bus, so all communication would have to pass there, so that the bus will become a bottle-neck. Therefore I think it's better to replace the 74HC374 by a 74HC273 octal D flip-flop followed by a separate 74HC244 tri-state buffer for the connection to the bus. That way the register's output is also available internally when some other signal occupies the bus. (I don't know if there's a function compatible part with the more logical pinout. You may also use a 74HC574 with /OE hardwired to ground.)