SLAAED8A October   2024  – July 2026 TAC5111 , TAC5112 , TAC5211 , TAC5212 , TAC5412-Q1 , TAD5112 , TAD5212

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Signal Generator 1 (SG1) – “Beep” Generator
    1. 2.1 Signal Generator 1 Amplitude and Output Channels
    2. 2.2 Signal Generator 1 Frequency
    3. 2.3 Beep Generator Example – Using TAC5212EVM-K and I2C Configuration
  6. 3Signal Generator 2 (SG2) – “Chirp” Generator
    1. 3.1 Signal Generator 2 Amplitude and Output Channels
    2. 3.2 Signal Generator 2 Start and Stop Frequency
    3. 3.3 ADSR Envelope Parameters
      1. 3.3.1 Attack/Decay Timers
      2. 3.3.2 Release Timer
      3. 3.3.3 Powerup Delay Timer
      4. 3.3.4 Sustain/Restart Timers
      5. 3.3.5 Sustain Level
    4. 3.4 Signal Generator 2 Output Modes
      1. 3.4.1 Manual Mode
        1. 3.4.1.1 Manual Mode Example I2C Configuration using TAC5212EVM-K
      2. 3.4.2 Continuous Pulse Mode
        1. 3.4.2.1 Continuous-Pulse Mode Example I2C Configuration using TAC5212EVM-K
      3. 3.4.3 One Shot Mode
        1. 3.4.3.1 One-Shot Mode Example I2C Configuration using TAC5212EVM-K
  7. 4Summary
  8. 5References
  9. 6Revision History

Continuous-Pulse Mode Example I2C Configuration using TAC5212EVM-K

The code below is used to generate a continuous periodic stream of chirp pulses. The ADSR note is set to 0xFFFFFFFF once in the configuration and is kept at this value for continuous generation of chirp pulses.

In this example:

  1. tattack = 200ms, tdecay = 100ms and trelease = 200ms.
  2. tsustain = 1sec = 1000ms.
  3. fstart = 100Hz, Δf = 0.295Hz, fs = 48kHz.
  4. Hence, per the equation in Signal Generator 2 Start and Stop Frequency, the stop frequency fstop = 100 + (0.295 * 48000 * (1000 – 200 – 100)) ~= 10kHz.
  5. trestart = 2sec = 2000ms.

Figure 3-2 shows the attack, decay and release timer measurements, while Figure 3-3 shows the sustain and restart timer measurements. Figure 3-6 shows that the signal frequency doesn’t change until the decay timer is reached. Figure 3-7 shows that the signal remains at fstop throughout the release phase.

w a0 00 00 #Page 0 
w a0 01 01 #SW Reset
d 10
w a0 00 00 #Page 0 
w a0 02 09 #Exit Sleep Mode with DREG and VREF Enabled
w a0 1a 30 #TDM protocol with 32-bit word length
w a0 64 20 #DAC Channel 1 configured for differential output with 0.6*Vref as common mode
w a0 65 20 #DAC OUT1P configured for line out driver and audio bandwidth
w a0 66 20 #DAC OUT1M configured for line out driver and audio bandwidth
w a0 6b 20 #DAC Channel 2 configured for differential output with 0.6*Vref as common mode
w a0 6c 20 #DAC OUT2P configured for line out driver and audio bandwidth
w a0 6d 20 #DAC OUT2M configured for line out driver and audio bandwidth
w a0 26 01 #RX Offset = 1
w a0 28 00 #RX CH1 to DAC CH1 disabled
    
w a0 00 01 #Page 1
w a0 2d 04 #Enable the chirp (SG2)
w a0 2c 40 #Enable side-chain mixer

w a0 00 17 #Page 23
w a0 7c 00 35 9d d4 #Chirp start frequency of 100 Hz
    
w a0 00 18 #Page 24
w a0 08 00 00 28 71 #Chirp delta frequency of 0.295 Hz
    
w a0 00 1c #Page 28
w a0 40 ff ff ff ff #ADSR_Note
w a0 50 00 01 77 00 #Restart Timer = 2sec
w a0 54 00 00 bb 80 #Sustain Timer = 1sec
w a0 58 00 01 b4 e8 #Attack Timer = 200ms
w a0 5c ff ff 25 07 #Release Timer = 200ms (w.r.t -6dB sustain level)
w a0 60 ff fe 4c 21 #Decay Timer = 100 ms
w a0 64 20 13 73 9e #Sustain Level = 0.501 (~-6dB)
    
w a0 00 11 #Page 17
w a0 70 40 00 40 00 #Side-Chain Mixer Gain for SG2 = 1
    
w a0 00 00 #Page 0
w a0 76 0c #enable 2 DAC channels
w a0 78 40 #enable DAC


 Attack, Decay and Release Times

Figure 3-4 Attack, Decay and Release Times


 Sustain and Restart Times

Figure 3-5 Sustain and Restart Times


 Chirp Start Frequency

Figure 3-6 Chirp Start Frequency


 Chirp Stop Frequency

Figure 3-7 Chirp Stop Frequency