2026 ECE 4550 — Control System Design — Lab #4- Serial Peripheral Interface Georgia institute of technology GEORGIA INSTITUTE OF TECHNOLOGY
SCHOOL of ELECTRICAL and COMPUTER ENGINEERING
ECE 4550 — Control System Design — Fall 2026 Lab #4: Serial Peripheral Interface
Contents 1 Background Material 1.1 Introductory Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Relevant Microcontroller Documentation . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Target Hardware Schematic Diagrams and Data Sheets . . . . . . . . . . . . . . . .
1 1 2 2
2 SPI Module: Step-by-Step Guidelines 2.1 Initialize the SPI Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Utilize the SPI Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 5 6
3 Lab Assignment 3.1 Pre-Lab Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Verify Device ID of Quanser Motion System . . . . . . . . . . . . . . . . . . . 3.2.2 Manipulate LEDs of Quanser Motion System . . . . . . . . . . . . . . . . . .
7 7 7 8 8
1
Background Material
1.1
Introductory Comments
The microcontroller chip, which is the core component used to implement a controller designed for a given plant, must be interfaced to the plant’s actuator(s) and sensor(s). In some applications, interfacing is achieved through manipulation of analog signals (DAC/ADC modules) or pulse signals (PWM/CAP modules). In this lab project, interfacing is achieved by serial data transfer between components using the serial peripheral interface (SPI module). With SPI, each control system signal being transmitted or received is represented by a collection of bits that are exchanged bit-by-bit between two components; Figure 1 shows the wiring used for this type of interface. CLK SPI Master Device
SIMO (or MOSI) SOMI (or MISO) STE (or CS)
SPI Slave Device
Figure 1: SPI communication between master and slave (only one slave shown).