Show Menu
Cheatography

EIOT 2 Cheat Sheet (DRAFT) by

Embedded Systems and Internet of Things

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Embedded Computing

microc­ont­roller or microp­roc­essor → perform dedicated tasks
part of a larger system
Embedded System Design process
design, develop, test, and deploy an embedded system
real-time, cost, and resoure constr­aints
Stages
1. Requir­ement Analysis → 2. Specif­ication → 3. HW/SW Design → 4. Integr­ation → 5. Testing → 6. Validation → 7. Deployment
Example: Temper­ature monitoring system
Uses sensor (LM35) + ADC + 8051
Reads temper­ature → compares with threshold
Controls output (fan/h­eater, relay)
Displays result on LCD
Timer → periodic sampling
Interrupts → real-time response
Continuous monito­ring, fast and accurate operation
Process (in embedded systems)
indepe­ndent program; own memory + resources; managed by OS
TinyOS - open-s­ource; lightw­eight; wireless sensor networks (WSNs); resour­ce-­con­str­ained systems
eg : sensor nodes
IPC - allows processes or tasks to exchange data and synchr­onize their activities
IPC - Inter-­Process Commun­ication

Program Design Models

Top-Down → Break system into smaller modules
Bottom-Up → Build system from low-level components
Modular Design → Indepe­ndent functional blocks
State Machine Model → States + transi­tions → predic­table behavior
Super Loop Model → Simple infinite loop (less respon­sive)
Interr­upt­-Driven Model → Handles time-c­ritical tasks
RTOS Model → Multit­asking with scheduling

Memory Interf­acing

Connects external memory (RAM/ROM) to MCU (using address, data, and control signals)
Ensures correct data transfer + selection + address selection
decoding circuit for proper memory selection
Process
MCU sends address of memory/I/O device during execution
Decoding circuit selects correct memory chip
Control signals used for read/write operations
Interf­acing matches memory requir­ements with MCU signals

I/O Device Interf­acing

Connects external devices (keyboard, sensor, display)
Uses: Latches; Buffers
Impact on Perfor­mance:
Proper interf­acing → faster data transfer
Poor interf­acing → delays, ineffi­ciency
Example: Smart home monitoring system
Inputs: Sensors (tempe­rature, light), switches (connected via I/O port)
Uses ADC to convert analog sensor data
Outputs: Relay (fan/l­ight), LCD, buzzer
Reads inputs → processes → controls outputs
timers for real-time; continuous monitor

fig. 1

 

RTOS

manage multiple tasks
time-c­ritical operations are executed (deadline)
task - basic unit of execution; function/ activity; control of RTOS scheduler; runs concur­rently
priori­ty-­based scheduling - each task assigned priority; CPU allocated to highes­t-p­riority task
role of scheduler
1. Task Selection
2. CPU Allocation
3. Preemption Control
4. Task State Management
5. Determ­inistic Execution
6. Context Switching Trigger
Multi-­tasking - execute multiple tasks concur­rently ; sharing CPU
Features
Deterministic Timing (predi­ctable response times for tasks)
Priority-Based Scheduling (highe­st-­pri­ority ready task first)

Process & Task

In RTOS
Example: Smart Industrial Monitoring and Control System
Tasks:
Sensor reading
Data processing
Control
Display
Communication
Alarm
Task Priority:
High → Alarm, Control
Medium → Sensor
Low → Display, Communication
Process: Group of related tasks
Monitoring → Sensor + Processing
Control → Control + Alarm
UI → Display + Communication
Uses priori­ty-­based preemptive scheduling
Tasks commun­icate using queues­/shared memory
Synchr­oni­zation via semaph­ore­s/mutex
Interrupts trigger high-p­riority tasks
Context switching enables multit­asking

Context Switching

saves state of current task; restores state of another task; share CPU
Context includes: PC, registers, stack pointer
RTOS uses to schedule tasks on priority
Supports preemption (high-­pri­ority tasks interrupt low-pr­iority) in RTOS
Improves CPU utiliz­ation
RTOS requires fast and predic­table

Priority based Scheduling

priorities based on importance
Highes­t-p­riority task first
preemptive scheduling (Handles asynch­ronous events)
determ­inistic behavior (predi­ctable execution)
low response time for critical tasks
Improves CPU utiliz­ation
used in RTOS-based systems
Issue: Priority inversion
Solution: Priority inheri­tance protocol