Lecture 8 - Microcontrollers and Design Patterns¶
Date: 9/15/16
Summary¶
There are many types of microcontrollers and peripherals. In this lecture we go over the basics of microcontroller interfaces and commonly found microcontrollers. We also discuss the software design patterns commonly found in software/firmware design.
Class Plan¶
- Go over each of the commonly found peripherals on a microcontroller (namely the Arduino the students have) such as I2C, SPI, PWM, and UART.
- Discuss what an interrupt is and why you shouldn’t use them.
- Discuss system timers.
- Show what a function is and why we encapsulate and decouple code.
- Show common software architectures (polling, state machine, interrupt driven, producer-consumer)
Activity¶
Complete the Building an XRD State Machine activity.
Assignment¶
Complete the Arduino Stoplight activity. Email us your completed code. Due 9/27/16