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

Manual Mode Example I2C Configuration using TAC5212EVM-K

The code below is used to manually start and stop the generation of a chirp output. When the ADSR note is set to 0x00000001, the chirp ramps up per attack and decay timers and continues until the ADSR note is set to 0x00000000. When this happens, the signal ramps down per the release timer. Figure 3-2 shows the “attack” profile of the signal, and Figure 3-3 shows the “release” profile of the signal.

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 29 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 01 26 e4 0d #Chirp start frequency of 550 Hz
    
w a0 00 18 #Page 24
w a0 08 00 00 45 86 #Chirp delta frequency of 0.507 Hz
    
w a0 00 1c #Page 28
w a0 40 00 00 00 00 #ADSR_Note
w a0 50 ff ff ff ff #Restart Timer = NA
w a0 54 ff ff ff ff #Sustain Timer = NA
w a0 58 00 01 08 cb #Attack Timer = 330ms
w a0 5c ff ff 8b 7e #Release Timer = 750ms (w.r.t 0dB sustain level)
w a0 64 40 00 00 00 #Sustain Level = 1 (0dB)

w a0 00 17
w a0 74 ff ff ff ff #Powerup Delay = NA

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

b # Breakpoint (Writing 0x00000001 into ADSR_Note will start the chirp)
w a0 00 1c #Page 28
w a0 40 00 00 00 01
w a0 00 00

b # Breakpoint (Writing 0x00000000 into ADSR_Note will stop the chirp)
w a0 00 1c #Page 28
w a0 40 00 00 00 00
w a0 00 00


 Start of manual chirp

Figure 3-2 Start of manual chirp


 Stop of manual chirp

Figure 3-3 Stop of manual chirp