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

Attack/Decay Timers

The attack and decay timers define the ramp-up profile of the chirp signal, until it reaches a steady-state “Sustain Level” (refer Sustain Level).

The attack timer is defined by the following equations:

Equation 5. tattack (in ms) = 1000*1x*1fs (in Hz)

For a timer value of tattack, the use can then compute the “attack slope” x, which is a floating positive number < 1.

Equation 6. x = 1000*1tattack (in ms)*1fs (in Hz)

To program x into the registers listed in Table 3-3:

  1. Multiply x with 230 (= X).
  2. Round X to the nearest integer value.

Similarly, the decay timer is defined by the following equation:

Equation 7. tdecay (in ms) = 1000*2*(1 - SustainLevel)(-y)*1fs(in Hz)

Since it is a ramp-down instead of ramp-up, the decay slope y is a negative floating number.

To program y into the registers listed in Table 3-3:

  1. Multiply y with 230 (= Y).
  2. Round Y to the nearest integer value.
  3. Since Y is a negative number, take its twos-complement value to program the register.
  4. If a decay profile is not required in the chirp waveform, program the register to 0x00000000.
  5. If the decay timer is set to 0x00000000, the sustain level is 1 irrespective of the value of the register.

Table 3-3 Attack/Decay Timers
PageRegisterDefault Attack/Decay time at 48kHz sampling rateValue
0x1C0x58

Attack Time = 5 ms

(0x0044523F)

X[31:24]
0x1C0x59X[23:16]
0x1C0x5AX[15:8]
0x1C0x5BX[7:0]
0x1C0x60

Decay Time = 0 ms

(0x00000000)

Y[31:24]
0x1C0x61Y[23:16]
0x1C0x62Y[15:8]
0x1C0x63Y[7:0]