Microprocessors & microcontrollers

Digital logic & computing · tree view

A processor is control unit + ALU + registers cycling through fetch/execute against a shared memory; when everything (CPU, ROM, RAM, I/O) lands on one chip you get a microprocessor (Intel 4004, 1971) or, with all memory integrated, a microcontroller (TI TMS1000, 1971–72).

Prerequisites

microprocessor symbol
microprocessor
microcontroller symbol
microcontroller
ttl-7400 symbol
ttl-7400
cmos-4000 symbol
cmos-4000
cpu-fetch-execute.svg
cpu-fetch-execute.svg
mcu-vs-mpu.svg
mcu-vs-mpu.svg

Both the program steps and the processed data were to reside in a common memory "pool," thus giving way to the label of the stored-program computer.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 16 — Microprocessors source

Putting these components together (read/write memory, ALU, and control unit) results in a digital device that is typically called a processor. If minimal memory is used, and all the necessary components are contained on a single integrated circuit, it is called a microprocessor.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 16 — Microprocessors source

CPU operation is summed up in the so-called fetch/execute cycle. Fetch means to read an instruction from memory for the Control Unit to decode. A small binary counter in the CPU (known as the program counter or instruction pointer) holds the address value where the next instruction is stored in main memory.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 16 — Microprocessors source

The instruction has now been "fetched" and "executed," so the Control Unit now increments the program counter to step the next instruction, and the cycle repeats itself.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 16 — Microprocessors source

Devices such as this, which can perform a variety of arithmetical tasks as dictated by a binary input code, are known as Arithmetic Logic Units (ALUs), and they comprise one of the essential components of computer technology.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 16 — Look-up tables source

The central processing unit IS THE COMPUTER. It is the cpu that processes the data transferred to it from one of the various input devices, and then transfers either the intermediate or final results of the processing to one of many output devices.

— NEETS Module 22, Module 22, ch. 2, p. 2-1 (Central processing unit)

It consists of a control section, internal storage section (main or primary memory), and arithmetic-logic section (fig. 2-1).

— NEETS Module 22, Module 22, ch. 2, p. 2-1 (Central processing unit)

The four major types of instructions are (1) transfer, (2) arithmetic, (3) logic, and (4) control.

— NEETS Module 22, Module 22, ch. 2, p. 2-3 (Control section)

MICROPROCESSOR—The semiconductor central processing unit (cpu) of a microcomputer that fits on a small silicon chip. The microprocessor is the central chip containing the control units of the computer.

— NEETS Module 22, Module 22, Appendix I (Glossary), p. AI-5
Show alternative explanations

The Intel 4004 (1971) was built for the Busicom 141-PF calculator: architecture by Marcian "Ted" Hoff and Stanley Mazor, silicon by Federico Faggin with Masatoshi Shima. It replaced a 12-custom-chip calculator design with a programmable 4-chip set — CPU, ROM, RAM and shift register as separate chips — and started at about 2,300 transistors.

— IEEE Spectrum: The Surprising Story of the First Microprocessors, research/electronics.db refs (component: microprocessor) source

The TI TMS1000 (designed under Gary Boone, announced 1971–72, shipped inside TI calculators from 1972) put a complete computer — CPU, ROM, RAM and I/O — on one cheap chip so appliances could be smart at consumer prices. That integration of memory and I/O onto the CPU chip is what makes it the first microcontroller rather than a microprocessor.

— IEEE Spectrum: The Surprising Story of the First Microprocessors, research/electronics.db refs (component: microcontroller) source

In some microprocessor designs, there are minimal programs stored within a special ROM memory internal to the device (called microcode) which handle all the sub-steps necessary to carry out more complex math operations.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 16 — Microprocessors source

The control section may be compared to a telephone exchange because it uses the instructions contained in the program in much the same manner as the telephone exchange uses telephone numbers.

— NEETS Module 22, Module 22, ch. 2, p. 2-2 (Control section)

In essence, its a processor inside of a processor; a program running inside of a program.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 16 — Microprocessors (on microcode) source

Fetch-decode-execute — one toy instruction traced step by step

A minimal machine: program memory holds LDA 5 (load accumulator from address 5), ADD 6, OUT, HLT, with mem[5] = 42 and mem[6] = 8. The program counter (PC) always drives the address bus for the fetch phase; the control unit decodes and, if data is needed, fetches the operand, then executes and advances the PC. Trace the LDA instruction cycle below.

To predict the outcome:

  1. Fetch: put PC on the address bus; memory returns the opcode; the control unit latches it into the instruction register (IR).
  2. Decode: the opcode LDA 5 means "address memory location 5 and copy its contents to the accumulator" — the control unit now knows which data fetch to make.
  3. Execute: address 5 goes out on the bus, mem[5] = 42 arrives, and the accumulator is loaded with 42.
  4. Advance: PC is incremented (0 → 1) and the whole cycle repeats for ADD 6 — after the full run the accumulator holds 42 + 8 = 50.
cycle_steppcaddress_busactionaccumulator
1 — fetch00 (points at opcode)memory returns 'LDA 5'; instruction register loads itunchanged
2 — decode0—control unit interprets opcode: operand lives at address 5unchanged
3 — execute05 (operand address)mem[5] = 42 read from memory into the accumulator42
4 — advance0 → 1—program counter incremented; next cycle begins42
next cycles (ADD 6, OUT, HLT)1 → 2 → 36 (operand)acc = 42 + 8 = 50; display; halt50

Microprocessor vs microcontroller — integration verdicts

Both are single-chip CPUs born in 1971, but they split on integration: the 4004 delegates program and data memory to companion chips (the 4001 ROM, 4002 RAM, 4003 shift register of the MCS-4 set), while the TMS1000 carries its own masked ROM, RAM and I/O on the die. Predict each row from that one difference.

To predict the outcome:

  1. Ask: what must sit outside the chip for the system to run? Microprocessor → external memory chips; microcontroller → nothing, memory is on the die.
  2. Follow the consequence for board cost and pin count: one MCU vs a multi-chip set wired together.
  3. Follow it for capacity: external chips mean expandable memory; on-chip mask ROM means fixed programs, tuned per customer product.
  4. Match the historical applications: 4004 = compute core of the Busicom 141-PF calculator; TMS1000 = complete brain of cheap TI calculators and later appliances.
featuremicroprocessor_4004_1971microcontroller_tms1000_1971_72
CPU on chipyesyes
program ROMexternal chip (4001)on-chip, mask-programmed
data RAMexternal chip (4002)on-chip
I/O peripheralsexternalon-chip
system cost to buildmulti-chip board (4-chip MCS-4 set)one chip — consumer prices
typical homeBusicom 141-PF calculator compute coreTI calculators, then appliances/toys
modern descendantsPC/server CPUs (8080 lineage)8051/PIC/AVR/ARM embedded chips

Milestones — from bistable latch to microcontroller

The components behind this lesson line up in time: the Eccles-Jordan trigger relay (1918) gave digital systems a storable bit; standard logic families made counters and registers cheap; then two 1971 chips split the processor world in two. Dates below come from the component records; check they are strictly ordered.

To predict the outcome:

  1. Note the 53-year gap between remembering a bit (1918) and shipping standard logic (1964–66): memory preceded computing hardware.
  2. CMOS (1968) supplies the low-power transistor logic that later dominates every chip on the timeline.
  3. 1971 splits in two: Intel's 4004 (CPU only, memory external) and TI's TMS1000 (CPU + memory integrated) — microprocessor vs microcontroller.
  4. Confirm the years ascend: 1918 → 1964/66 → 1968 → 1971 → 1971–72.
yearmilestonecomponent
1918Eccles & Jordan trigger relay — first bistable multivibratorflip-flop
1964/1966TI introduces the 7400-series TTL logic family (SN5400 1964, SN7400 1966)ttl-7400
1968RCA COS/MOS — the 4000-series CMOS logic linecmos-4000
1971Intel 4004 for Busicom: Hoff/Mazor architecture, Faggin/Shima siliconmicroprocessor
1971–72TI TMS1000 under Gary Boone — complete computer on one chipmicrocontroller

Candidate projects — awaiting review

  • Ben Eater's 8-bit breadboard computer: build the SAP CPU from 7400 parts — program counter, instruction register, ALU, RAM — and step the clock by hand to watch fetch-decode-execute happen on the bus, one LED-visible microstep at a time. (https://eater.net/8bit, community)
  • BE6502: assemble a real WDC 65C02 with EEPROM, SRAM and a 65C22 I/O chip; write a tiny monitor program in assembly, then extend the memory map — the memory-map and address-decode half of this lesson in practice. (https://eater.net/6502, community)
  • Bare ATmega328P on a breadboard: strip the Arduino board away and run the chip with just power, reset pull-up and (optionally) a crystal — the physical proof that a microcontroller is CPU+RAM+ROM+ I/O on one chip, needing almost nothing else to compute. (https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoToBreadboard, community)
  • 4004 archaeology: study the MCS-4 chip set (4001 ROM / 4002 RAM / 4003 shift register / 4004 CPU) from the Busicom 141-PF story, then — if you can source one — run a real 4004 via the open-source Retroshield Arduino shield to execute original 4004 assembly. (https://www.4004.com/, community)