Skip to content

Commit 26d6b0a

Browse files
committed
Describe step counter
1 parent a43b012 commit 26d6b0a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

hardware.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The clock is a square wave at 50% duty cycle and is used for triggering and sync
6262
* Toggle switch: for switching between continuous mode or single step mode.
6363
* Outputs
6464
* The normal clock signal.
65-
* The inverted clock signal.
65+
* The inverted clock signal. This is just the normal clock signal sent through the inverter.
6666
* LEDs
6767
* 3x Yellow
6868
* The first shows the square wave from the first 555 timer.
@@ -155,7 +155,19 @@ The instruction register is very similar to the general purpose A and B register
155155

156156
## Step Counter
157157

158-
TODO
158+
The step counter is a simple 3 bit binary counter, that counts in a loop from 0 to 4. The current step is shown both in binary and decimal using LEDs, and is used by the instruction decoder to know which of the 5 steps of the current instruction to execute. These steps are also called T-states, or timing states.
159+
160+
Incrementing the steps happens on the inverted clock to give the instruction decoder time to prepare the control lines before the next normal clock tick.
161+
162+
* Chips
163+
* 74LS161 counter: for doing the counting.
164+
* 74LS138 demultiplexer: used for converting the binary value from the counter into decimal. Also used for resetting the counter after it reaches step 5.
165+
* Outputs
166+
* 3-bit step: goes directly into the instruction decoder.
167+
* LEDs
168+
* 3x Red: shows the current step in binary. Note that the bit order is opposite compared to the other binary displays, so 4 is `001` instead of `100`.
169+
* 5x Green: shows the current step, as the LED that is off.
170+
* 1x Blue: shows the inverted clock.
159171

160172

161173
## Instruction Decoder

0 commit comments

Comments
 (0)