The big idea: A microcontroller needs four things around it before any program will run: a stable supply, a way of loading the program, inputs conditioned to a voltage it can read, and output drivers for anything bigger than an LED.
The software decides the behaviour; the circuit decides whether the software gets a chance.
The chip with its pins, what is inside it, and how the program gets there.
Interactive diagram
Explore the labelled diagram, charts and maps for this topic in full study mode.
Free preview
This is the free notes preview
You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:
- FlashcardsLock in vocabulary and key terms with spaced repetition.
- Practice questionsAnswer exam-style questions and get instant AI marking.
- Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
- Personalised study planA daily plan built around your exam date and weak areas.
| Part of the circuit | What it is | What happens without it |
|---|---|---|
| Decoupling capacitor | A 100 nF capacitor right beside the supply pins | The chip resets at random whenever an output switches, because the supply dips for a few microseconds |
| Reset arrangement | A resistor holding the reset pin high, and often a push switch to pull it low | A floating reset pin picks up interference and resets the chip unpredictably |
| Programming header | A few pins brought out to a connector | The software cannot be loaded or updated without unsoldering the chip |
| Pull-up or pull-down resistors | A resistor holding an input at a known level when the switch is open | The input floats and reads randomly, so the product responds to nothing at all |
| Output drivers | A transistor or relay, with a flyback diode on any coil | A pin asked to drive a motor is destroyed the first time it switches on |
A floating input is not an input: A switch alone connects a pin to 0 V when pressed and to nothing at all when released.
A pull-up resistor gives it a defined level the rest of the time. Without one, the input reads whatever interference is nearby — which looks exactly like a software bug and is not.
Get feedback like a real examiner
Submit your answers and get instant feedback — what you did well, what's missing, and exactly what to write to score full marks.
What the software has to do beyond the obvious
Read the input more than once
A mechanical switch bounces for a few milliseconds. Reading it twice a few milliseconds apart — debouncing — turns one press into one event instead of five.
Apply a dead band at any threshold
Switch on at one value and off at another, so a reading sitting on the boundary does not chatter the output.
Fail safe
Decide what the outputs should do if a sensor reads impossibly, and make the safe state the one the hardware falls into if the software stops.
Sleep between events
A battery product should spend almost all its life asleep, waking on an interrupt — the difference between months of life and years.
The design-project version: A PIC circuit for a school project is usually: a regulated supply, a decoupling capacitor, a reset resistor, a programming header, one sensor in a divider, one switch with a pull-up, and one transistor-driven output with a diode.
That list is worth memorising, because it is also a complete answer to "construct a circuit using a microcontroller".
How this is tested — creating simple circuits that use a microcontroller to carry out a task. It comes up two ways:
Paper 1 — multiple choice
- Identify the purpose of a supporting component.
- Choose what must sit between a pin and a stated load.
Paper 2 — analysing a product
- Construct a microcontroller circuit for a described task.
- Explain the purpose of each supporting component.
The trap: Drawing the chip and the load and nothing else. The decoupling capacitor, the pull-up and the flyback diode are all marked, and all three are needed for the thing to work.
Construct a microcontroller circuit for a greenhouse vent: a temperature sensor, a manual override button, and a motor that opens the vent.
Model answer plan
See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.