Skip to main content
Northern IrelandTechnology and DesignSyllabus dot point

What is a microcontroller (PIC), and why does it replace hard-wired logic in control systems?

The microcontroller (PIC): architecture, input/output ports, memory, the program cycle, and the advantages of programmable control over discrete logic.

A CCEA A-Level Technology and Design answer on the microcontroller (PIC), its architecture of processor, memory and input/output ports, the fetch-execute program cycle, and the advantages of programmable control over hard-wired discrete logic.

Generated by Claude Opus 4.812 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

CCEA expects you to explain the microcontroller (PIC): its architecture (processor, memory, I/O ports, clock), the program (fetch-execute) cycle, how a pin is configured as input or output, and the advantages of programmable control over hard-wired discrete logic. This is a central A2 topic.

The answer

What a microcontroller is

Architecture

The program cycle and pin direction

Worked example: a microcontroller-based fan controller

Examples in context

Example 1. Washing-machine controller. A single microcontroller sequences the motor, valves, heater and pump and reads the door and water sensors, replacing a cabinet of relays and timers, the part-count and flexibility advantage in a real appliance.

Example 2. Microbit / PIC project board. A school project reads buttons and a sensor and drives LEDs and a buzzer from one chip, reprogrammed to change behaviour without touching the wiring, exactly the flexibility CCEA highlights.

Try this

Q1. Name the three main parts of a microcontroller. [3 marks]

  • Cue. Processor (CPU), memory, and input/output ports (a clock/timers also acceptable).

Q2. Give two advantages of a microcontroller over hard-wired discrete logic. [2 marks]

  • Cue. Any two of: fewer components/smaller and cheaper circuit; reprogrammable/flexible (change behaviour without rewiring); complex timing and decisions easy in software; higher reliability with fewer connections.

Q3. Why is a transistor often connected to a microcontroller output pin? [2 marks]

  • Cue. The pin can supply only a small current, not enough to drive a motor, lamp or relay directly, so the pin switches a transistor that handles the larger load current.

Exam-style practice questions

Practice questions written in the style of CCEA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

CCEA 20206 marksExplain what a microcontroller (PIC) is and describe its main parts. Give three advantages of using a microcontroller instead of hard-wired discrete logic in a control product.
Show worked answer →

A microcontroller (for example a PIC, made by Microchip) is a complete computer on a single chip: it contains a processor (CPU), memory and input/output ports, and runs a stored program to control a system. The user writes a program that reads inputs, makes decisions and sets outputs.

Its main parts:

  • Processor (CPU): fetches and executes the program instructions and makes decisions.
  • Memory: program memory (often flash, holding the program) and RAM (holding data/variables while running); some have EEPROM for non-volatile data.
  • Input/output (I/O) ports: pins configured as inputs (read switches, sensors via the ADC) or outputs (drive LEDs, transistors, displays).
  • A clock/oscillator sets the speed, and built-in timers and an ADC are common.

Three advantages over discrete logic: (1) fewer components and a smaller, cheaper circuit (one chip replaces many gates/timers); (2) flexibility - behaviour is changed by reprogramming, not rewiring, so the same hardware serves many products and is easy to modify/iterate; (3) complex functions (timing, counting, sequences, decisions) are easy in software, and reliability is higher with fewer connections.

Markers reward the computer-on-a-chip definition, the CPU/memory/I-O parts, and three valid advantages (fewer parts, reprogrammable/flexible, complex behaviour in software).

CCEA 20214 marksExplain how a microcontroller pin can be used as both an input and an output, and why a transistor is often needed on an output pin.
Show worked answer →

Each I/O pin can be configured in software as either an input or an output by setting a data-direction register (in PIC terms, the TRIS register): setting a pin as an input lets the program read the logic level applied to it (from a switch or sensor); setting it as an output lets the program drive the pin high or low to control something.

A transistor (or MOSFET) is often needed on an output pin because a microcontroller output can only supply a small current at low voltage (typically a few milliamps), which is not enough to drive a motor, lamp, relay or solenoid directly. The pin switches a transistor, which in turn switches the larger load current (with a flyback diode for inductive loads).

Markers want the software-configurable direction (read vs drive) and the reason for the transistor (the pin cannot supply enough current/voltage for a power load).

Related dot points

Sources & how we know this