Communication for Embedded Systems

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/34

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:52 PM on 5/21/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

35 Terms

1
New cards

Why does longer wire force lower baud rates?

  • Wires have capacitance (longer wire = higher capacitance = slower rise time)

  • Digital signal = sum of harmonics; band-limited channel cannot transmit high harmonics

  • Edges round off, bit boundaries blur - no solution except dropping rate

2
New cards

What are the four wired communication standards compared?

  • UART (asynchronous, point-to-point)

  • SPI (synchronous, master-slave)

  • I²C (synchronous, multi-master)

  • CAN (asynchronous differential, automotive)

3
New cards

UART wires and clock

  • Two wires (TX, RX)

  • No clock (asynchronous)

  • Both ends must agree on baud rate in advance (9600, 115200)

4
New cards

UART frame format

  • Start bit (0)

  • 5-9 data bits

  • Optional parity

  • 1-2 stop bits

  • Standard: 8N1 (8 data, no parity, 1 stop)

5
New cards

UART devices and use cases

  • Point-to-point only

  • 3.3V and 5V systems need level shifter

  • Used for PC debugging, GPS modules, Bluetooth-serial

6
New cards

What happens if UART baud rates disagree?

  • Data silently corrupted

  • No error detection unless parity enabled

  • Both ends must agree in advance

7
New cards

SPI wires

  • Four wires: MOSI, MISO, SCLK

  • Plus one SS/CS line per slave

  • Synchronous (clock provided by master)

8
New cards

SPI characteristics

  • Very fast (tens to hundreds of MHz)

  • Full-duplex, push-pull drivers

  • One master, many slaves (each extra slave needs GPIO pin for SS)

9
New cards

SPI use cases

  • SD cards

  • Displays

  • ADCs

  • External flash

10
New cards

I²C wires

  • Two wires: SDA (data), SCL (clock)

  • Open-drain with external pull-up resistors

  • Wired-AND logic

11
New cards

I²C addressing and speed

  • 7-bit addresses → up to 128 devices

  • Standard 100 kHz, fast 400 kHz, high-speed up to 3.4 MHz

  • Multi-master, multi-slave on same wires

12
New cards

I²C pull-up resistor trade-off

  • Too high: slow rise times (limits speed)

  • Too low: wastes current

  • Typical: 4.7 kĪ© at 100 kHz, 1-2.2 kĪ© at 400 kHz

13
New cards

I²C bus arbitration

  • If two masters transmit simultaneously

  • One that senses low while trying to drive high loses

  • Backs off and retries

14
New cards

I²C use cases

  • Sensors (IMUs, temperature)

  • EEPROMs

  • LCDs

  • SMBus = I²C for PC-motherboard management

15
New cards

CAN bus origin and wires

  • Designed by Bosch in 1986 for automotive

  • Two differential wires (CAN-H, CAN-L)

  • 120 Ī© termination at each end

16
New cards

CAN bus noise immunity

  • Differential signalling makes extremely immune to common-mode noise

  • Exactly what you want next to ignition system

  • Multi-master and message-based

17
New cards

CAN bus arbitration

  • Every node sees every message, filters by ID

  • Non-destructive arbitration

  • Lower message ID (higher priority) wins; other quietly retries

18
New cards

CAN bus features

  • Built-in CRC, ACK bits, error frames

  • Up to 1 Mbit/s classical CAN

  • CAN FD reaches 5+ Mbit/s

19
New cards

Side-by-side comparison: Wires

  • UART: 2 wires

  • SPI: 4+ wires

  • I²C: 2 wires

  • CAN: 2 wires (differential)

20
New cards

Side-by-side comparison: Clock

  • UART: Async (baud match)

  • SPI: Sync

  • I²C: Sync

  • CAN: Async (bit stuffing)

21
New cards

Side-by-side comparison: Devices

  • UART: Point-to-point

  • SPI: 1 master, N slaves

  • I²C: 128 addresses

  • CAN: Multi-master, many nodes

22
New cards

Side-by-side comparison: Speed

  • UART: Low–medium

  • SPI: High

  • I²C: Low–medium

  • CAN: Up to ~1 Mbit/s

23
New cards

Side-by-side comparison: Full duplex

  • UART: Yes

  • SPI: Yes

  • I²C: No

  • CAN: No

24
New cards

Side-by-side comparison: Noise immunity

  • UART: Low

  • SPI: Low

  • I²C: Low

  • CAN: Very high

25
New cards

Side-by-side comparison: Typical use

  • UART: Debug, simple links

  • SPI: SD cards, displays

  • I²C: Sensors, EEPROMs

  • CAN: Automotive, industrial

26
New cards

What happens to square waves over long wires?

  • Square waves need many high frequency components (Fourier series)

  • Capacitors filter out high frequencies

  • "Squareness" lost through capacitors → timing issues

27
New cards

Why were historical parallel ports problematic at high speed?

  • One line per bit (many wires, large connectors)

  • All signals need to arrive at same time

  • Capacitance changes based on wire bends → signals arrive at different times

28
New cards

What is UART?

  • Universal Asynchronous Receiver/Transmitter

  • Serial communication

  • 8 bit data, 1 stop bit, no parity (8N1) typical

29
New cards

SPI master-slave architecture pins

  • CS (Chip Select): selects which slave to talk to

  • SCLK (Serial Clock): master drives clock

  • MOSI (Master Out, Slave In)

  • MISO (Master In, Slave Out)

30
New cards

What is I²C?

  • Inter-chip communication

  • Half-duplex

  • Up to 5 Mb/s

31
New cards

Sleep mode: Idle

  • CPU stopped

  • Most clocks still running

  • Wake from any interrupt

32
New cards

Sleep mode: ADC noise reduction

  • CPU stopped

  • Most clocks still running

  • Wake from ADC complete or external interrupt

33
New cards

Sleep mode: Power-save

  • CPU stopped

  • Async timer only running

  • Wake from timer or external interrupt

34
New cards

Sleep mode: Power-down

  • CPU stopped

  • All clocks stopped

  • Wake from external interrupt or watchdog

35
New cards

EEPROM write functions compared

  • eeprom_write_byte(): always writes (burns cycle even if unchanged)

  • eeprom_update_byte(): reads first, writes only if different (preferred)

  • AVR EEPROM rated for ~100,000 write cycles per cell