Book contents
- Learning the Art of Electronics
- Learning the Art of Electronics
- Copyright page
- Dedication
- Contents
- Preface to the Second Edition
- Preface to the First Edition
- Overview, as the Course begins
- Part I Analog: Operational Amplifiers and their Applications
- Part II Analog: Discrete Transistors
- Part III Analog: Operational Amplifiers and their Applications
- Part IV Digital: Gates, Flip-Flops, Counters, PLD, Memory
- Part V Digital: Analog–Digital, PLL, Digital Project Lab
- Part VI Microcontrollers
- 22N Microcontrollers I: Introduction
- 22L Lab: Microcontrollers I
- 22S Supplementary Notes: Microcontrollers I
- 22O Online Content: Microcontrollers I
- 23N Microcontrollers II: Stacks, Timers and Input
- 23L Lab: Microcontrollers II
- 23S Supplementary Notes: Creating Robust, Readable and Maintainable Code
- 24N Microcontrollers III: Using Internal Peripherals
- 24L Lab: Microcontrollers III
- 24S Supplementary Notes: Waveform Processing
- 24W Worked Examples: Speeding up the SAMD21 CPU clock
- 25N Microcontrollers IV: Timers & Interrupts
- 25L Lab: Microcontrollers IV
- 25S Supplementary Notes: A Detailed Look at SAMD21 Interrupt Handling
- 25W Worked Examples: Using SAMD Interrupts
- 25O Online Content: Creating PlaySong() data
- 26N Microcontrollers V: Serial Communication
- 26L Lab: Microcontrollers V
- 26W Worked Examples: Interrupt-Driven Serial I/O and SPI Off-chip RAM
- 27N Microcontrollers VI: Using an RTOS
- 27L Lab: Microcontrollers VI
- 27S Supplementary Notes: Installing embOS
- 27W Worked Examples: Adding IR Remote Control to the Jukebox
- 28N Project Possibilities: Toys in the Attic
- 28O Online Content: Toys in the Attic Sensors, Actuators, and Gadgets
- Book part
- Index
25N - Microcontrollers IV: Timers & Interrupts
from Part VI - Microcontrollers
Published online by Cambridge University Press: 18 March 2025
- Learning the Art of Electronics
- Learning the Art of Electronics
- Copyright page
- Dedication
- Contents
- Preface to the Second Edition
- Preface to the First Edition
- Overview, as the Course begins
- Part I Analog: Operational Amplifiers and their Applications
- Part II Analog: Discrete Transistors
- Part III Analog: Operational Amplifiers and their Applications
- Part IV Digital: Gates, Flip-Flops, Counters, PLD, Memory
- Part V Digital: Analog–Digital, PLL, Digital Project Lab
- Part VI Microcontrollers
- 22N Microcontrollers I: Introduction
- 22L Lab: Microcontrollers I
- 22S Supplementary Notes: Microcontrollers I
- 22O Online Content: Microcontrollers I
- 23N Microcontrollers II: Stacks, Timers and Input
- 23L Lab: Microcontrollers II
- 23S Supplementary Notes: Creating Robust, Readable and Maintainable Code
- 24N Microcontrollers III: Using Internal Peripherals
- 24L Lab: Microcontrollers III
- 24S Supplementary Notes: Waveform Processing
- 24W Worked Examples: Speeding up the SAMD21 CPU clock
- 25N Microcontrollers IV: Timers & Interrupts
- 25L Lab: Microcontrollers IV
- 25S Supplementary Notes: A Detailed Look at SAMD21 Interrupt Handling
- 25W Worked Examples: Using SAMD Interrupts
- 25O Online Content: Creating PlaySong() data
- 26N Microcontrollers V: Serial Communication
- 26L Lab: Microcontrollers V
- 26W Worked Examples: Interrupt-Driven Serial I/O and SPI Off-chip RAM
- 27N Microcontrollers VI: Using an RTOS
- 27L Lab: Microcontrollers VI
- 27S Supplementary Notes: Installing embOS
- 27W Worked Examples: Adding IR Remote Control to the Jukebox
- 28N Project Possibilities: Toys in the Attic
- 28O Online Content: Toys in the Attic Sensors, Actuators, and Gadgets
- Book part
- Index
Summary
In the previous lab, you configured the SAMD21’s internal 10-bit Digital-to-Analog converter to output an analog voltage to an I/O pin and then used the DAC to synthesize a 128 point sine wave. While this worked, updating the DAC in a loop did not provide precise control over the frequency of the output signal and the process of sending data values to the DAC consumed all the processor CPU cycles. This design also did not ensure that samples were output at constant time intervals.
- Type
- Chapter
- Information
- Learning the Art of ElectronicsA Hands-On Lab Course, pp. 967 - 975Publisher: Cambridge University PressPrint publication year: 2025