SME
College · Engineering
Embedded Systems
4 topics
Computer
Before this course
Topics
Microcontrollers
Main lesson
A DAC’s output voltage
Use this for “An 8-bit DAC with a 5 V reference gets the code 200. What voltage comes out?”
An LED’s resistor on a pin
Use this for “A 3.3 V pin drives an LED with a 2 V drop at 10 mA. What resistor goes in series?”
A divider down to 3.3 V
Use this for “A 5 V signal reaches a 3.3 V pin through 2.2 kΩ over 3.3 kΩ. What voltage does the pin see?”
Setting and clearing a register bit
Use this for “An 8-bit register holds 0x41. Set bit 3, then clear bit 6. What does it hold?”
Interrupts and timers
Main lesson
PWM frequency and duty cycle
Use this for “A 16 MHz timer with prescaler 8 counts to TOP = 1999 and compares at 500. Find the PWM frequency, duty and average voltage at 5 V.”
Longest timer period
Use this for “How long can a 16-bit timer at 16 MHz run with prescaler 1024 before it overflows?”
CPU time in an interrupt
Use this for “An interrupt fires at 10 kHz and its ISR takes 20 μs. What share of the CPU does it use?”
What happens on an interrupt
Use this for “A timer matches its compare value. Put in order what the CPU does until the main program resumes.”
Serial protocols
Main lesson
Baud-rate register and error
Use this for “A 16 MHz microcontroller sets its UART to 115 200 baud. What goes in UBRR, and how far off is the baud rate?”
SPI throughput
Use this for “An SPI bus clocks at 8 MHz. How many bytes a second can it move, and how long does a 16-bit transfer take?”
I²C transaction time
Use this for “How long does a 400 kHz I²C write of 2 data bytes take, address byte included?”
UART, SPI or I²C?
Use this for “A bus has two shared wires, pull-up resistors and a 7-bit address for each device. Is it UART, SPI or I²C?”
Real-time constraints
Course test
See what you know: 10 questions on this course
New questions each time. Pass to mark it complete.