SWEN 340 Final Exam Topics
- State Machine advantages and overall design
- Identifying events and states in a system description
- A state is a condition that persists for a meaningful time
- An event is an action that may cause a state change
- Elevator state example: moving between floors
- Elevator event example: doors completed closing
- Using interrupts versus doing polling
- The meaning and usage of the volatile keyword
- Converting 12 bit ADC readings to values
- C Language bitwise operations including an 8 bit hardware register using |, ~, << , >> , and & bitwise operators.
- How to mask one or a few bits on an 8 bit register (setting the selected bits to 0 without altering the other bits)
- Example of masking:
- to mask bit 2
- uint32_t mask = ~( 1 << 2 ) ; // create a mask with just one bit set to 0
- *reg_ptr &= mask ; // now clear that one bit
- How to set one or a few bits on an 8 bit register without altering any other bits in that register
L. Kiser Dec. 5, 2024
Revised L. Kiser Dec 4, 2025