Week 7 ยท Displays & Signals

Session 32: Buses on the oscilloscope

Teach & buildFlex120 minLesson 21: UART, I2C & SPI Reference

Learning outcomes

  • Compare UART, I2C and SPI wiring, speed and device selection
  • Run an I2C scanner and read the addresses on the bus
  • Capture UART and I2C traffic on the oscilloscope
  • Choose a bus for a given module

Kit and components

  • Uno, I2C LCD and RTC module, jumpers
  • Two-channel oscilloscope (with serial decode if available)

Pre-reading about 20 min

Students read these on their phones before class. They are listed on the student Before class page.

  1. Lesson 21: Three buses at a glance
  2. Lesson 21: I2C
  3. Lesson 21: SPI
  4. Theory Reference: Using the oscilloscope on Uno signals

Session plan

  1. 0:0010 min
    Recap

    Quiz: the I2C LCD

  2. 0:1025 min
    Demo

    Three buses

    Compare the wiring and device selection of UART, I2C and SPI using the lesson's table and pin map.

  3. 0:3540 min
    Measure

    Traffic on the wire

    Students capture a UART character on TX and an I2C update on SDA and SCL, identify the start condition and, if the scope decodes, read the address byte.

  4. 1:1530 min
    Build

    Two devices, one bus

    Students add the RTC to the LCD's bus, run the scanner and confirm both addresses (0x27 and 0x68).

  5. 1:4515 min
    Wrap-up

    Which bus would you choose?

    GPS module, SD card, temperature sensor: students justify a bus for each.

Checkpoint: ready to move on?

Students' scanner reports both the LCD and RTC addresses, and they have a labelled capture of an I2C transfer.

Extension for fast finishers

Compare I2C rise and fall times and explain the difference using the pull-ups section of the I2C LCD lesson.

Catch-up path

Concentrate on the scanner and the two-device bus; skip the UART capture.

Homework and practice

Pre-reading for S33.

Facilitator notes

  • Flex session: in a shorter course, run the scanner as part of S31 and skip the captures.