Chapter 3 Flashcards
What is SFR TCON
A register used to control timers such as start, stop, reset etc
What is SFR TMOD
A register used to configure how timers operate
What do timer data registers do?
The timer data registers store the current value of the timer as the timer is incremented this value increases
Modern timer operations
Comparator
A value written to register is compared in hardware to timer counter. If value is equal then comparator flag = 1 or interrupt called.
Modern timer operations
Capture
The current counter value is captured and written to a register in hardware. Usually triggered from an interrupt.
Modern timer operations
Prescaler
Integer divisor to lower frequency of ticks.
Loop timeouts
Loop timeouts used to ensure exit from loops
Variable is initialised and then incremented until overflow
Hardware timeouts
More precise than loop timeouts. A timer is configured with required timeout delay and timer flag is monitored
Interrupts
Based on an event, a signal is sent to pause its current program execution and execute some code associated with the event.
External interrupts
External interrupts are those that are generated by signals external to the chip.