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

Manual Mode

SG2 in manual mode generates a continuous pulse users enable and disable using the ADSR note. This means writing the ADSR note at the beginning and end of the manual mode script. Refer to Section 3.1. Restart and sustain timers are not available here.

In manual mode, pulses generated are sampled into the number of samples based on an operating sampling frequency per second. For example...

Equation 20. f s =   96 K H z

...means there are 96K samples within a second.

In manual mode, each pulse spans one second and then repeats. Manual mode is subject to aliasing when frequency sweeping. Refer to the formulas below to generate clean signals. These formulas deduct the sample at which aliasing occurs, number of samples required per pulse and time per frequency rise.

Equation 21. c h i r p   s t a r t   f r e q u e n c y   +   ( n o .   o f   s a m p l e s ) ×   c h i r p   d e l t a   f r e q u e n c y   <   f s 2 ,   H z
Equation 22. t i m e   p e r   d e l t a   f r e q u e n c y   =   d e l t a   f r e q u e n c y s a m p l i n g   f r e q u e n c y   ,   s e c
Equation 23. f r e q u e n c y   s w e e p   t i m e   e l a p s e d   =   n o .   o f   s a m p l e s   a t   d e s i r e d   e n d   f r e q u e n c y   n o .   o f   s a m p l e s   p e r   s e c ,   s e c

This set of formulas are applicable to all SG2 modes.

When programming manual mode, the ADSR acknowledgment script is executed first. Then follows other ADSR parameters and the ADSR enable command at the end of manual mode script.

# Key: w a0 XX YY ==> write to I2C address 0xa0, to register 0xXX, data 0xYY 
# # ==> comment delimiter 
#
#The following list gives an example sequence of items that must be #executed in the time between powering the device up and reading data #from the device. Note that there are other valid sequences depending #on which features are used.
#See the corresponding EVM user guide for jumper settings and audio #connections.
#
# Line-Out Fully-Differential 2-channel : OUT1P_M- Ch1, OUT2P_M- Ch2. 
# FSYNC = 48 kHz (Output Data Sample Rate), BCLK = 12.288 MHz (BCLK/FSYNC = 256) ################################################################### 
#manual mode example script
#acknowledge ADSR engine then enable it with x01 at the end of the script		
w a0 00 00	# locate page x00
w a0 01 01	# device reset
w a0 02 09	# come out of sleep mode with VREF and DREG up
	
w a0 00 01	# locate page 0x01
w a0 2d 04	# enable SG2 only
	
#Using chirp start frequency formula	
w a0 00 17  # locate page 0x17	
w a0 7c 02 18 2a 47  # SG2 start frequency at 1 KHz
	
#Using chirp delta frequency formula	
w a0 00 18  # locate page 0x18		
w a0 08 00 00 00 44 a1  #delta frequency of 0.5 Hz not causing aliasing	
	
#Acknowledge ADSR envelope	
w a0 00 1c  # locate page 0x1c	
w a0 40 00 00 00 00  # ADSR note, set 0 when powering 	
                     # up dac and set it to 1 to enable chirp	
	
#Set sustain and restart timer the same	
w a0 50 00 00 00 00  # restart_timer	
w a0 54 00 00 00 00  # sustain_timer	
	
w a0 00 17	# locate page 0x17
w a0 74 00 00 00 00  # power up delay	
	
#SG2 channel selection and amplitude level configuration 	
w a0 00 11 # locate page 0x11	
w a0 70 40 00 40 00  # OUT1
#w a0 74 40 00 40 00 # OUT2	
	
#Output configuration 	
w a0 00 00	# locate page 0
w a0 76 0c	# enable OUT1
w a0 78 40	# enable all DACs
	
#Turn on ADSR envelope	
w a0 00 1c          #locate page 1c	
w a0 40 00 00 00 01 # ADSR note, set 0 when powering 	
                    # up DAC and set it to 1 to enable chirp	
                    # for manual mode	
TAC5412QRGERQ1 SG2
                                                  Manual Mode Scope Capture: 0.5Hz Sweep on 1KHz
                                                  Signal at 2Vrms, Full-Scale Figure 4-4 SG2 Manual Mode Scope Capture: 0.5Hz Sweep on 1KHz Signal at 2Vrms, Full-Scale