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

Signal Generator 2 Start and Stop Frequency

Since the SG2 generates a chirp signal, the user would need to configure a start frequency fstart and a frequency increment Δf for each sample. The resulting output is a signal whose frequency is swept from fstart to (fstart + NchirpΔf), Nchirp being the number of samples in a single chirp pulse.

The chirp signal stays at fstart until the signal is ramped up and settles to the Sustain Level. Then the signal frequency changes at a rate of Δf per sample. When the signal ramps down, it retains the last updated frequency.

These two frequencies are programmed through coefficients x and y, described in the equations below:

Equation 3. x = 2πfstartfsy = 2πΔffs

with fs being the sampling rate.

The chirp frequency can range from 0 to fs/2. Hence, the following equations need to be kept in mind when programming the chirp parameters:

Equation 4. Nchirp = tchirp * fs

Where tchirp (chirp duration) = (Sustain Time - Decay Time - Attack Time)

Hence, fstart + (Nchirp * Δf) fs2.

“Sustain Time” is the pulse duration, described in detail in Sustain/Restart Timers.

It is not recommended to let the signal frequency at any point exceed beyond fs/2, as this results in aliasing. With sampling rates higher than 48kHz,the SG2 generator can be used as an Ultrasonic Activity Generator (UAG), generating chirp pulses outside of the 20Hz-20kHz audible band.

To generate a sustained single-tone signal, users can configure the SG2 to operate in Manual Mode (refer Section 3.4.1). The fstart can be programmed to the desired frequency, with the Δf programmed to 0Hz.

The values of x and y are then written into the registers described in Table 3-2, by:

  1. Multiplying each value by 228 (= X or Y).
  2. Rounding off X or Y to the nearest integer value.
  3. Convert this to 32-bit hexadecimal and program into the registers.
Table 3-2 SG2 Frequency Parameters
PageRegisterSignal Generator Start/Δ FrequencyValue
0x170x7C

Start Frequency = 16kHz

(0x2182A470)
X[31:24]
0x170x7DX[23:16]
0x170x7EX[15:8]
0x170x7FX[7:0]
0x180x08

Δ Frequency = 0Hz

(0x00000000)
Y[31:24]
0x180x09Y[23:16]
0x180x0AY[15:8]
0x180x0BY[7:0]