Mini CPU from transistors
4-bit computer from MOSFETs only, with mask ROM.
- ST7735 TFT
How it works
A 4-bit accumulator computer from MOSFETs only: program counter (3 bits), mask ROM 8 × 5 bits (the program is in the arrangement of the transistors), 4-bit adder, multiplexers, accumulator register + carry flip-flop. Every rising clock edge executes one instruction: LOAD n (ACC = n) or ADD n (ACC = ACC + n), and the program counter advances. Program: LOAD 1, ADD 2, ADD 2, ADD 2, ADD 2, LOAD 0, ADD 3, ADD 3 → ACC 1 3 5 7 9 0 3 6, then from the start. Clock: automatic 2 Hz (switch AUTO) or button TAKT with AUTO open. RESET sets program counter and ACC to 0 (automatic at power-on). Green LEDs = ACC, yellow = carry. Output J1 (JST PH 7-pin): 1–4 = ACC D0–D3, 5 = STB (clock delayed by ≈7 µs: latch data on the rising STB edge), 6 = 5 V, 7 = GND, 5 V CMOS levels. Cable W1 leads to the TFT board (J2, board "Display"). Hard-wired gate control with counters, hex decoder and SPI shift register; no microcontroller, no firmware. The TFT shows the last output value as a hex digit.
Wiring
Each line is one connection (net) and the pins it joins.
| Net | Pins |
|---|---|
| GND | C_RST 2C_STB 2D_ACC0 KD_ACC1 KD_ACC2 KD_ACC3 KD_CARRY KJ1 7QSB1n1 SQSB2n1 SR_CLK 2SW_RESET 2V_TAKT −V1 −W1 7 |
| VDD | J1 6QSB1p1 SQSB2p1 SR_RST 1SW_TAKT 1V1 +W1 6 |
| ACC0 | J1 1R_ACC0 1W1 1 |
| ACC1 | J1 2R_ACC1 1W1 2 |
| ACC2 | J1 3R_ACC2 1W1 3 |
| ACC3 | J1 4R_ACC3 1W1 4 |
| ACLK | SW_AUTO 1V_TAKT + |
| ACLK2 | R_AUTO 1SW_AUTO 2 |
| CLK | R_AUTO 2R_CLK 1R_STB 1SW_TAKT 2 |
| D_3V3 | DC2 1DC3 1DC4 1DDS1 VCCDDS1 LEDDPOR 1DU1 OUT |
| D_D0_3V3 | DR1 2DR2 1 |
| D_D1_3V3 | DR3 2DR4 1 |
| D_D2_3V3 | DR5 2DR6 1 |
| D_D3_3V3 | DR7 2DR8 1 |
| D_RST | DPOR 2DRST 1 |
| D_STB_3V3 | DR9 2DR10 1 |
| nRST | C_RST 1R_RST 2SW_RESET 1 |
| nSTB | QSB1n1 DQSB1p1 DQSB2n1 GQSB2p1 G |
| STB | J1 5QSB2n1 DQSB2p1 DW1 5 |
| STBD | C_STB 1QSB1n1 GQSB1p1 GR_STB 2 |
| X_5V | DC1 1DU1 INDU1 ENJ2 6W1 6 |
| X_D0 | DR1 1J2 1W1 1 |
| X_D1 | DR3 1J2 2W1 2 |
| X_D2 | DR5 1J2 3W1 3 |
| X_D3 | DR7 1J2 4W1 4 |
| X_GND | DC1 2DC2 2DC3 2DC4 2DDS1 GNDDR2 2DR4 2DR6 2DR8 2DR10 2DRST 2DU1 GNDJ2 7W1 7 |
| X_STB | DR9 1J2 5W1 5 |
- C_RST
- Capacitor
- C_STB
- Capacitor
- D_ACC0
- LED
- D_ACC1
- LED
- D_ACC2
- LED
- D_ACC3
- LED
- D_CARRY
- LED
- DC1
- Capacitor
- DC2
- Capacitor
- DC3
- Capacitor
- DC4
- Capacitor
- DPOR
- Capacitor
- DR1
- Resistor
- DR2
- Resistor
- DR3
- Resistor
- DR4
- Resistor
- DR5
- Resistor
- DR6
- Resistor
- DR7
- Resistor
- DR8
- Resistor
- DR9
- Resistor
- DR10
- Resistor
- DRST
- Resistor
- QSB1n1
- N-MOSFET
- QSB1p1
- P-MOSFET
- QSB2n1
- N-MOSFET
- QSB2p1
- P-MOSFET
- R_ACC0
- Resistor
- R_ACC1
- Resistor
- R_ACC2
- Resistor
- R_ACC3
- Resistor
- R_AUTO
- Resistor
- R_CLK
- Resistor
- R_RST
- Resistor
- R_STB
- Resistor
- SW_AUTO
- Switch
- SW_RESET
- Push button
- SW_TAKT
- Push button
- V_TAKT
- Square wave / clock