HARDWARE LAB 18 · PCM / DAC / AUDIO DMA

KEEP THE DAC FED.

Follow an analog tone through sampling, signed PCM codes, a circular DMA buffer, and a zero-order-hold DAC. Then overload the refill path until the buffer runs dry.

PCM FORMAT44.1 kHz · 16-BITBUFFER512 / 512 FRAMESOUTPUT1.00 kHzXRUNS0
SAMPLER + DAC SCOPE

ANALOG → CODES → STAIRS

NYQUIST OK
ANALOG SOURCEQUANTIZED SAMPLEDAC HOLD
CIRCULAR BUFFER LOGIC ANALYZER

OCCUPANCY + DMA EVENTS

STREAMING
EVENT TRACE

DMA HANDSHAKE

TimeEventOccupancyRequest
0.00 msSTART512 / 512IDLE
ONE CURRENT SAMPLE

CODE → VOLTAGE

ANALOG REQUEST0.00000SIGNED PCM CODE0DAC LEVEL0.00000QUANTIZATION ERROR0.00e+0

The DAC holds each code until the next playback-clock edge. During an underrun, this model holds the last valid code—an audible discontinuity when fresh data resumes.

DATA PATH

WHO DOES WHAT?

  1. 01SAMPLERMeasures the source every 1 / sample-rate seconds.
  2. 02QUANTIZERRounds each measurement to one signed PCM code.
  3. 03MEMORY + DMAMoves bursts into a circular peripheral buffer.
  4. 04PLAYBACK CLOCKConsumes one frame per DAC clock edge.
  5. 05DAC + HOLDTurns each code into a level until the next code arrives.