📄 tables.inc
字号:
**************************************************************
* (C) COPYRIGHT TEXAS INSTRUMENTS, INC. 1996 *
**************************************************************
* Program Name: DTMF codec *
* File Name: tables.inc *
* File Description: tables for dtmfsub.asm *
* *
* Author: Gunter Schmer *
* Date: 03/24/97 *
* Revision: 3.0 *
* Latest working date: 03/24/97 *
**************************************************************
***************************************
*** Decoder Constants
***************************************
N .set 102 ;max count for DFT loops
THR_SIG1 .set 1900*32768/10000 ;threshold for possible tone
THR_SIG2 .set 2150*32768/10000 ;threshold for definite tone
THR_PAU .set 458*32768/10000 ;threshold for pause energy
THR_STDTWI .set 2512*32768/10000 ;threshold for standard twist (-5dB)
THR_REVTWI .set 1259*32768/10000 ;threshold for reverse twist (-9dB)
THR_ROWREL .set 2000*32768/10000 ;threshold for row's relative peak ratio
THR_ROW2nd .set 2000*32768/10000 ;threshold for row's 2nd harmonic ratio
THR_COLREL .set 2000*32768/10000 ;threshold for col's relative peak ratio
THR_COL2nd .set 2000*32768/10000 ;threshold for col's 2nd harmonic ratio
sqrt_iterations .set 16 ;iterations for sqrt in gain control function
.sect "tables"
***************************************
*** Decoder Tables
***************************************
*******************************************************
* The following table holds the coefficients for *
* the 16 Goertzel filters, computed as follows *
* *
* .word cos(2pi*k/N)*32768 ;coefficient *
* *
* with N = 102 (1st and 2nd Harmonics) *
* k = 9, 10, 11, 12, 15, 17, 19, 21 (1. Harm) *
* k = 18, 20, 22, 24, 31, 34, 38, 42 (2. Harm) *
* *
*******************************************************
COEF1st .word 27980 ; 1st Harmonics
.word 26956
.word 25701
.word 24219
.word 19073
.word 16325
.word 13085
.word 9315
COEF2nd .word 14739 ; 2nd Harmonics
.word 11414
.word 7549
.word 3032
.word -10565
.word -16503
.word -22318
.word -27472
*****************************************************************
* Digit mapping table *
* Low byte : row number *
* High byte: column number *
*****************************************************************
KEYS .word 0301h ; '0'
.word 0000h ; '1'
.word 0001h ; '2'
.word 0002h ; '3'
.word 0100h ; '4'
.word 0101h ; '5'
.word 0102h ; '6'
.word 0200h ; '7'
.word 0201h ; '8'
.word 0202h ; '9'
.word 0003h ; 'A'
.word 0103h ; 'B'
.word 0203h ; 'C'
.word 0303h ; 'D'
.word 0300h ; 'E' = '*'
.word 0302h ; 'F' = '#'
***************************************
*** Encoder Tables
***************************************
*******************************************************
* The following table contains the coefficients for *
* the difference equations of the digital sinusoidal *
* oscillators. *
* *
* In general: *
* DEQ: y(n) = 2*cos(2pi*f/fs)*y(n-1) - y(n-2) *
* I.C.: y(-1) = 0 *
* y(-2) = -A*sin(2pi*f/fs) *
* where A = desired amplitude of sine wave *
* f = desired frequency of sine wave *
* fs = sampling frequency *
* *
*******************************************************
COEFFS .word 27980 ;row 1
.word 26956 ;row 2
.word 25701 ;row 3
.word 24219 ;row 4
.word 19073 ;col 1
.word 16325 ;col 2
.word 13085 ;col 3
.word 9315 ;col 4
*******************************************************
* The following table contains a generic set of *
* initial conditions for the difference equations of *
* the digital sinusoidal oscillators. *
* This table is used for initialization of the *
* osci-table of each channel *
* *
* In general: *
* DEQ: y(n) = 2*cos(2pi*f/fs)*y(n-1) - y(n-2) *
* I.C.: y(-1) = 0 *
* y(-2) = -A*sin(2pi*f/fs) *
* where A = desired amplitude of sine wave *
* f = desired frequency of sine wave *
* fs = sampling frequency *
* *
*******************************************************
OSCIS .word 0 ;row1 y(n-1)
.word -1024*5204/10000 ; y(n-2)
.word 0 ;row2 y(n-1)
.word -1024*5686/10000 ; y(n-2)
.word 0 ;row3 y(n-1)
.word -1024*6203/10000 ; y(n-2)
.word 0 ;row4 y(n-1)
.word -1024*6736/10000 ; y(n-2)
.word 0 ;col1 y(n-1)
.word -1024*8132/10000 ; y(n-2)
.word 0 ;col2 y(n-1)
.word -1024*8671/10000 ; y(n-2)
.word 0 ;col3 y(n-1)
.word -1024*9168/10000 ; y(n-2)
.word 0 ;col4 y(n-1)
.word -1024*9587/10000 ; y(n-2)
****************************************************************
* Test Buffer for encoding results *
****************************************************************
;DATA .sect "buffer" ;length 32k words
; .include "c:\mitel\test17.inc"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -