Session 32: Buses on the oscilloscope
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.
Session plan
- 0:0010 minRecap
Quiz: the I2C LCD
- 0:1025 minDemo
Three buses
Compare the wiring and device selection of UART, I2C and SPI using the lesson's table and pin map.
- 0:3540 minMeasure
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.
- 1:1530 minBuild
Two devices, one bus
Students add the RTC to the LCD's bus, run the scanner and confirm both addresses (0x27 and 0x68).
- 1:4515 minWrap-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.