Chapter 5. Data Conversion

In this chapter, we will cover the following topics:

  • Setting up the ADC
  • Configuring general-purpose timers
  • Using timers to trigger conversions
  • Setting up the DAC
  • Generating a sine wave

Introduction

Most signals that we encounter in the natural world are continuous; for example, we perceive sound produced by an orchestra as a continuum of intensities ranging from pianissimo (very soft) to fortissimo (very loud). Computers, on the other hand, work with binary quantities that are inherently discrete. The number of discrete values that can be represented depends on the number of bits that are used to represent the quantity (for example, 8 bits can represent 28 discrete values). Computers that are designed to interact with real-world ...

Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.