Skip to content

Basic microcontroller concepts

Content aligned with Topic 1 — Basic concepts from the Microcontrollers course (UNEXPO · Mechatronics), based on Prof. Ing. Yoel Pire’s material.

A microcontroller (μC) is a programmable integrated circuit that puts the basic blocks of a tiny computer on one chip:

  • CPU — executes program instructions step by step.
  • Memories — store the program and working data.
  • Input/output lines — connect the chip to LEDs, buttons, sensors, etc.
  • Peripherals — internal or external modules that extend what the device can do.

To use it you write firmware: the CPU reads instructions stored in memory and runs them. There is no operating system like on a PC; control is direct.

Microcontroller (μC)Microprocessor (μP)
What it integratesCPU, memory, buses, and peripherals in one chipOnly the CPU (processor)
System typeClosed — complete computer with fixed capabilityOpen — you attach external memory, I/O, and peripherals
External pinsLines that drive peripherals and portsAddress, data, and control buses to build a PC
ProgrammingYou focus on the applicationYou must also manage external devices
Academic examplePIC18F4550 (single chip)Classic PC CPU in a socket (RAM, chipset, and storage live on the motherboard, not inside the processor chip)
Comparison of architectures and embedded computing systems
The μC integrates CPU, memory, and peripherals in one chip; the μP is only the processor and the rest of the system is built separately. — Based on Topic 1 — Basic concepts · UNEXPO

Raspberry Pi and similar boards: not the same thing

Section titled “Raspberry Pi and similar boards: not the same thing”

A Raspberry Pi is not a microcontroller or a bare microprocessor. It is a single-board computer (SBC) — a mini PC already assembled on the board:

  • An SoC (System-on-Chip): application ARM cores, GPU, and other blocks in one integrated circuit.
  • RAM included on the board (soldered or in the SoC package, depending on model).
  • USB, HDMI, network, power, and GPIO connectors.
  • microSD (or internal storage) for the operating system and your programs.

You do not start from an empty chip and add RAM like in an academic μP-only design: the board is already a complete computer. It runs Linux (a full OS), not direct firmware burned to Flash like on the PIC.

PIC18F4550Raspberry Pi
What it isMicrocontroller (μC)Single-board computer (SBC)
ProgramFirmware in chip FlashOS + apps on SD card / Linux
MemoryFlash, RAM, and EEPROM inside the chipRAM on the board + storage on SD
Study levelRegisters, bits, assemblyPython, Linux, high-level drivers

Peripherals let the μC interact with the world. They can be inside the chip or wired outside.

Modules the manufacturer builds into the microcontroller. On the PIC18F4550 you will find, among others:

  • Timers / counters (Timer0, Timer1, Timer2)
  • A/D converter (ADC)
  • UART / USART (serial communication)
  • PWM / CCP module
  • SPI and I2C interfaces
  • USB (on the 4550)
  • Internal EEPROM memory

Devices not inside the chip, connected to pins:

  • Sensors (temperature, pressure, distance…)
  • Communication modules (Bluetooth, Wi-Fi, GPS…)
  • External memories
  • LCD or OLED displays
  • 7-segment displays
  • Matrix keyboards
  • Motors, relays, drivers

In the lab you use both: the PIC’s internal ADC and, for example, an external LCD wired to GPIO ports.

By how firmware is stored, the course distinguishes:

TypeWhat it isReprogrammable
ROMProgram burned at the factoryNo
OTPOne-Time Programmable — written onceNo
EPROMElectrically programmed; erased with UV lightYes (UV erase)
EEPROMElectrically programmed and erasedYes
FlashElectrically programmed; PIC18F4550 stores your .hex hereYes

On the PIC18F4550 the program lives in Flash (non-volatile: kept when power is off). Data you want to keep between power cycles can go in internal EEPROM.

TypeRole in the μC
RAMTemporary variables, counters, flags while the program runs. Lost on power-off unless saved elsewhere.
Special registers (SFR)Control ports, timers, ADC, etc. (covered in Foundations).

A microcontroller can be used in:

  • Sensor and actuator control
  • Industrial process control
  • Medical equipment and robotics
  • Appliances and human-machine interfaces (keyboard, display)
  • Motor control (PWM)
  • Communication (SPI, I2C, UART, USB)
  • Clocks, alarms, calculators, and many more

You now know the general Topic 1 concepts. Continue with What is the PIC18F4550 to see how these blocks apply to the chip you will use in the lab.

Interactive exam

Basic microcontroller concepts

Based on: Tema 1. Conceptos Básicos (1).pdf

0 of 0 answered

The fundamental blocks of a microcontroller are...
A microcontroller is a... system
On the PIC18F4550, the program (.hex) is stored in...
Which is an INTERNAL microcontroller peripheral?
PIC Flash memory is characterized by...