PhysicsScore

Microprocessor and microcontroller basics

  • CSIR NET
  • UP Assistant Professor
  • UP GDC Mains

4 minute read · Updated 2026-11-15

Picking up from

In Memories (CMOS, ROM, RAM, MOS), we saw that memory technologies trade volatility, write behavior, density and access method while storing coded information in physical states. How does stored information drive a complete programmable control system?

In one line

Processors execute coded instructions, while microcontrollers integrate computation with memory and peripherals for embedded control.

The idea, explained

A processor fetches an instruction, decodes its operation, reads or writes operands and updates its state. Arithmetic logic, registers, control logic and memory interfaces cooperate in that sequence. The instruction set specifies architectural behavior, while the implementation determines pipeline, timing and other internal details. A clock period is therefore not automatically the time for every complete instruction.

A microcontroller commonly integrates a processor core with on-chip memory, timers, digital input/output and communication or analog peripherals. A microprocessor system can arrange those functions externally or through additional integrated components; the distinction is architectural practice rather than a universal performance ranking. Interrupts allow events to redirect execution under controlled state preservation, while polling checks events through explicit program flow. Addressing, word width, endianness and peripheral register maps must be specified for numerical or code-level questions. One generic block diagram does not define every device’s exact instruction or bus timing.

Core ideas

  • Registers provide small rapidly accessed architectural state, while memory organization and caches vary by design. Avoid assigning one universal hierarchy to every controller.
  • An address identifies a location under the system’s addressing convention. Byte-addressed and word-addressed machines interpret address increments differently.
  • Interrupt latency includes response and service conditions; it is not simply the interrupt source’s physical event duration.
  • Timers can count clock-derived events independently of instruction-by-instruction delays, making their prescalers and rollover rules central to timing calculations.
  • A larger clock frequency does not alone imply higher application performance. Instruction count, cycles, memory stalls and peripheral waiting all contribute.

Key formulas

Execution-time accounting

texec=Ninst CPIavgfclkt_{\mathrm{exec}}=\frac{N_{\mathrm{inst}}\,\mathrm{CPI}_{\mathrm{avg}}}{f_{\mathrm{clk}}}

The mean cycles per instruction includes the declared workload and relevant stalls under the model.

Timer interval scale

t=N Pfclkt=\frac{N\,P}{f_{\mathrm{clk}}}

The timer counts NN ticks with prescaler PP; endpoint, rollover and reload conventions must match the device description.

Draw data flow between core, registers, memory and peripherals, then identify which part controls the requested function. State address unit, word width and byte order before interpreting a memory layout. For timing, use actual cycle counts, prescalers and rollover behavior rather than multiplying instructions by one assumed cycle. For event response, distinguish polling period from interrupt service time and prioritize any stated shared-resource constraints. Keep device-specific instructions conditional on supplied documentation instead of treating one processor family as the definition of all embedded systems.

Quick worked example

A timer receives a 1 MHz1\,\mathrm{MHz} clock divided by a prescaler of ten. One timer tick lasts 10 μs10\,\mu\mathrm s. A thousand ticks span 10 ms10\,\mathrm{ms} under the declared count convention.

Where this leads

This completes the subject sequence. Return to the subject index to compare the models, assumptions and observable predictions across its topics.

Related: Memories (CMOS, ROM, RAM, MOS) — prerequisite definitions used in this model.

Practice this topic

Practice this topic

10 questions in Assistant Professor · Physics · Physics. Sign in and practice access may be required.

Other exam sections