Close

Program Counter Register

A project log for Nits Processor

8-bit TTL technology processor

cedCed 11/05/2019 at 13:030 Comments

One register is very specific within the CPU: the Program Counter (PC).

Here is a definition of the Program Counter

A program counter is a register in a computer processor that contains the address (location) of the instruction being executed at the current time. As each instruction gets fetched, the program counter increases its stored value by 1. After each instruction is fetched, the program counter points to the next instruction in the sequence.

So basically, if we read carefully the definition above, we understand that:

So for the Program Counter, there is need for a new action signal

The other action signals are the same as for a regular register:

[see log entry on Registers]

The IC used for our general purpose registers does not provide a way to increment the current value of the register. Increment could be implemented using gates but it is not such an easy task. Hopefully, there is an IC that provides just that:

However, the existing IC is 4 bits only, therefore we need to chain 2 ICs to provide an 8-bit register.

This IC is the 74HCT161:

When chaining two 74161, the TC signal is used to enable the counter of the next chip.

As for the general purpose register, the 74HCT245 is used as the 3-state output buffer.

As always, for learning purposes, the action signal are all set to active high and may need an inverter.

Discussions