Embedded Systems

Leaving Cert Higher Level Computer Science revision notes with diagrams.

3 min readHigher LevelBy Studytok
Practise this topic — free →

Inputs, Embedded Systems, and Automation

Analogue vs Digital Inputs

  • Digital Inputs: Electrical signals that exist in only one of two discrete states—completely ON (1, typically 3.3 V or 5 V) or completely OFF (0, 0 V). Examples include push buttons, switches, and digital motion sensors.
  • Analogue Inputs: Signals that vary continuously over time across an electrical range. Examples include light-dependent resistors (light level), thermistors (temperature), and potentiometers (rotational angle).

Because microprocessors operate only on binary numbers, an Analogue-to-Digital Converter (ADC) must sample the continuous analogue voltage and convert it into a discrete digital integer (such as 0 to 1023 for a 10-bit converter).

Schematic plots compare a continuous analogue voltage with a two-state digital signal and show analogue samples becoming discrete ADC readings.
Schematic plots compare a continuous analogue voltage with a two-state digital signal and show analogue samples becoming discrete ADC readings.

Embedded Systems

An embedded system is a dedicated computer built into a larger mechanical or electrical system to perform a specific dedicated control function. Examples include domestic washing machines, automotive anti-lock braking systems (ABS), and smart thermostats. They rely on microcontrollers integrating a CPU, memory, and programmable input/output pins on a single chip, built for low power draw and automated operation.

Automated Embedded Program (MicroPython)

In the Applied Learning Task 4 context, students use embedded code to read sensor data, store values, and control outputs automatically. The BBC micro:bit MicroPython module uses read_analog() (using the American spelling in code) to read pin voltages between 0 and 1023.

from microbit import *

readings = []                       # list to store analogue data
for i in range(10):
    level = pin1.read_analog()      # analogue input: reads 0 to 1023
    readings.append(level)          # store the reading
    sleep(1000)                     # wait 1 second between samples

average = sum(readings) / len(readings)

if average < 300:                   # threshold check for dark conditions
    pin0.write_digital(1)           # digital output: turn LED on
else:
    pin0.write_digital(0)           # digital output: turn LED off

Execution Trace: If the ten recorded readings are [250, 260, 240, 255, 245, 250, 260, 240, 250, 250], their sum is 2500 and the average is 2500÷10=2502500 \div 10 = 250. Because 250<300250 < 300, pin 0 outputs a high voltage (1) and turns on the LED without human intervention.

You've read the theory
Now turn it into exam marks.

Practise embedded systems as questions and flashcards in Studytok, with explanations when you get stuck.

Continue for free →
  1. ✓
    Read the notes
    1 sections
  2. 2
    Test yourself
    Questions marked instantly
  3. 3
    Keep revising
    Flashcards and exam-style practice