SLAAED8 October   2024 TAC5111 , TAC5112 , TAC5211 , TAC5212 , TAC5412-Q1 , TAD5112 , TAD5212

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Signal Generator 1 (SG1)
    1. 2.1 Signal Generator 1 Introduction
    2. 2.2 Signal Generator 1 Amplitude and Output Channels
    3. 2.3 Signal Generator 1 Frequency
    4. 2.4 Generating Register Coefficients Using PPC3
  6. 3ADSR Envelope Parameters
    1. 3.1 ADSR Introduction
    2. 3.2 Restart and Sustain Timers
    3. 3.3 Attack, Release, and Decay Timers
    4. 3.4 Sustain Level
    5. 3.5 ADSR Envelope Example Script
    6. 3.6 Ultrasonic Activity Detection (UAD) ADSR Mode
  7. 4Signal Generator 2 (SG2)
    1. 4.1 Signal Generator 2 Introduction
    2. 4.2 Signal Generator 2 Amplitude
    3. 4.3 Signal Generator 2 Frequency
    4. 4.4 Signal Generator 2 Modes
      1. 4.4.1 Manual Mode
      2. 4.4.2 Continuous Pulse Mode
      3. 4.4.3 One Shot Mode
  8. 5Summary

Attack, Release, and Decay Timers

Attack, release and decay define the ramps of ADSR envelope. Refer to Programmable Register Map for 32-bit ADSR Parameters to determine registers that configure these three parameters. When calculating attack time and release time, use the equation below.

Equation 11. 22k×1fs×1000 = desired time, ms.

Where k is an absolute value between 0 to 1 for both timers.

This formula generates register coefficients for attack and release time.

Equation 12. Reg.Coeff=DEC2HEXMODROUNDk× 230, 0, 232,8

The equation can be used as is for attack time. However for release time, k must be inserted as a negative number to retrieve accurate hex values. Use the equation below to calculate desired decay time.

Equation 13. ABS[(2-(2×Sustain Level))/(k×FS_Vrms)/fs)]×1000 =desired time, ms

The register coefficient equation, Reg.Coef f, for attack and release time apply to decay time as well.