PHY 452 · Electronics
Our notes
2 min readWhat a microprocessor is
A microprocessor is a CPU on a single chip (an LSI or VLSI circuit) that fetches instructions from memory and executes them. The Intel 4004 (1971) was the first; the 8-bit 8080 and 8085, and the Zilog Z80, were widely used for teaching. A microcontroller puts the CPU, memory and input/output on one chip (the 8051, AVR in Arduino, PIC).
Architecture
- ALU (arithmetic logic unit): adds, subtracts, compares, does AND, OR, XOR and shifts.
- Registers: the accumulator (A) holds results; general registers (B, C, D, E, H, L in the 8085); the flag register (zero, carry, sign, parity, auxiliary carry).
- Program counter (PC): address of the next instruction.
- Stack pointer (SP): top of the stack in memory (for subroutines and interrupts).
- Instruction register and decoder, and the control unit that produces timing and control signals.
Buses
- Address bus: carries memory addresses out of the CPU (16 lines in the 8085 = 2^16 = 65,536 bytes, 64 KB of memory).
- Data bus: carries data both ways (8 lines in an 8-bit processor).
- Control bus: read, write, interrupt, reset and clock signals.
Memory
- ROM/EPROM/Flash: non-volatile, holds programs.
- RAM: read-write, volatile, holds data and the stack.
- A memory map shows which addresses belong to which chip; decoders select them.
The fetch-decode-execute cycle
- The PC puts the address on the address bus; the instruction is read into the instruction register.
- The PC increases.
- The instruction is decoded.
- It is executed (data may be read or written).
- Repeat. The clock sets the pace (the 8085 used about 3 MHz).
Input/output and interrupts
- I/O ports connect switches, displays, keypads and converters; memory-mapped or I/O-mapped.
- Polling: the processor checks devices in turn.
- Interrupts: a device signals the processor, which saves its place on the stack and runs a service routine. More efficient.
- Support chips: programmable peripheral interface (8255), timer (8253).
Microprocessor control
Processors read sensors through ADCs, decide by a program, and drive outputs through DACs, relays and transistors: traffic lights, washing machines, generator controllers, inverter systems and process control in industry.
Exams usually ask
- Draw and explain the block diagram of a microprocessor.
- Explain the functions of the three buses and the fetch-execute cycle.
Common mistake
Thinking the address bus carries data. It only carries addresses; data travels on the data bus.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
No reading links here yet
Our team adds free books, videos and practice for each topic, and opens every link before it goes up.