Program Counter
Counters are critically important in any computer, as the Program Counter, loop counters, various other address registers, stack pointers, etc. In my design, pointers can load from either bus, output to either bus, increment, and decrement. To accommodate this, I plan on using 74LS193s, which are two state 4-bit counter ICs. Each bus will require transceivers to control access to and from the counter, and an additional transceiver is required to control the output from the counters, as they are always outputting their value and this would conflict with data or address information being read from a bus.
Technically speaking, this will require ten ICs. I will need two 74LS245 transceiver ICs for the data bus, and two more for the address bus. An additional two 74LS245s are required to to enable and disable the counter output (again, to prevent conflicts when reading a bus). The counters themselves will comprise four 74LS193s. These ICs are 4-bit up/down counters with load and reset. I still need to prototype a counter on breadboard, but it is possible I will need an additional inverter IC (perhaps the 74LS06 hex inverter) to simplify the control signals.
What are the benefits of this design?
- Counters can store values from either bus.
- Counters can output values to either bus.
- Counters can reset to zero, increment, and decrement.
- Counters can act as transfer registers between the data and address bus.
- Counters can act as loop counters, with the carry and borrow pins acting as flags for > FFFF and < 0000.
- The ALU can write directly to any counter.
It is going to be pretty complex to design, unfortunately. More on that in a later post.