資料介紹
;=====================================================
;?Lixin: 2002/7/30
;?dtmf dial
;?fx=8M
;=====================================================
.include "sys.h"
.include "def_macro.h"
.include "sys_var.h"
.include?"InterruptServer.h"
.global?DialOutController_DialOut
.global?DialOutController_Initial
.global?DialOutController_SetIndex
.global?DialOutController_Int_TimerA
.global?DialOutController_Int_DA
_sr_DA_OUT??equ??_doc_data
_sr_DTMF_FLAG?equ??_doc_flag
bDIAL_INP??equ??0
bFINISH???equ??1
cDIAL_TIME?equ 50?;25???;0x600*(286/8000000)=54.912ms
cDTSLI_TIME?equ 100?;50??;(0xc00-0x600)*286/8000000=54.912ms
;DACNT_TBL is the da numbers in one sin wave of a frequency
DACNT_TBL:?DW?86,78,71,64,50,45,41,37
;DTRANS_TBL is used to calculate the two freq for one number
DTRANS_TBL:?DW?0DH, 00H, 01H, 02H, 04H, 05H, 06H, 08H, 09H, 0AH, 0CH, 0EH, 0BH, 0FH, 03H, 07H; '*'->0AH, '#'->0BH
; the DA out table
;×××××××頻率低采樣個數(shù)多,頻率高采樣點少××××××××××
F_697:
?DW?0X1C0,0X1E0,0X201,0X221,0X241,0X260,0X27E,0X29B,0X2B7,0X2D1,0X2EA,0X302,0X318,0X32C,0X33E,0X34E,0X35C,0X368,0X371,0X378
?DW?0X37D,0X37F,0X37F,0X37D,0X378,0X371,0X368,0X35C,0X34E,0X33E,0X32C,0X318,0X302,0X2EA,0X2D1,0X2B7,0X29B,0X27E,0X260,0X241
?DW?0X221,0X201,0X1E0,0X1C0,0X19F,0X17E,0X15E,0X13E,0X11F,0X101,0XE4,0XC8,0XAE,0X95,0X7D,0X67,0X53,0X41,0X31,0X23
?DW?0X17,0XE,0X7,0X2,0X0,0X0,0X2,0X7,0XE,0X17,0X23,0X31,0X41,0X53,0X67,0X7D,0X95,0XAE,0XC8,0XE4
?DW?0X101,0X11F,0X13E,0X15E,0X17E,0X19F
F_770:
?DW?0X1C0,0X1E4,0X207,0X22B,0X24D,0X26F,0X290,0X2AF,0X2CD,0X2E9,0X303,0X31B,0X330,0X343,0X354,0X362,0X36E,0X376,0X37C,0X37F
?DW?0X37F,0X37C,0X376,0X36E,0X362,0X354,0X343,0X330,0X31B,0X303,0X2E9,0X2CD,0X2AF,0X290,0X26F,0X24D,0X22B,0X207,0X1E4,0X1C0
?DW?0X19B,0X178,0X154,0X132,0X110,0XEF,0XD0,0XB2,0X96,0X7C,0X64,0X4F,0X3C,0X2B,0X1D,0X11,0X9,0X3,0X0,0X0
?DW?0X3,0X9,0X11,0X1D,0X2B,0X3C,0X4F,0X64,0X7C,0X96,0XB2,0XD0,0XEF,0X110,0X132,0X154,0X178,0X19B
F_852:
?DW?0X1C0,0X1E7,0X20E,0X235,0X25B,0X27F,0X2A2,0X2C4,0X2E3,0X300,0X31A,0X332,0X347,0X358,0X367,0X372,0X37A,0X37F,0X37F,0X37D
?DW?0X377,0X36D,0X360,0X350,0X33D,0X326,0X30D,0X2F2,0X2D3,0X2B3,0X291,0X26D,0X248,0X222,0X1FB,0X1D3,0X1AC,0X184,0X15D,0X137
?DW?0X112,0XEE,0XCC,0XAC,0X8D,0X72,0X59,0X42,0X2F,0X1F,0X12,0X8,0X2,0X0,0X0,0X5,0XD,0X18,0X27,0X38
?DW?0X4D,0X65,0X7F,0X9C,0XBB,0XDD,0X100,0X124,0X14A,0X171,0X198
F_941:
?DW?0X1C0,0X1EB,0X217,0X242,0X26B,0X293,0X2B8,0X2DC,0X2FC,0X31A,0X334,0X34B,0X35D,0X36C,0X377,0X37D,0X380,0X37D,0X377,0X36C
?DW?0X35D,0X34B,0X334,0X31A,0X2FC,0X2DC,0X2B8,0X293,0X26B,0X242,0X217,0X1EB,0X1C0,0X194,0X168,0X13D,0X114,0XEC,0XC7,0XA3
?DW?0X83,0X65,0X4B,0X34,0X22,0X13,0X8,0X2,0X0,0X2,0X8,0X13,0X22,0X34,0X4B,0X65,0X83,0XA3,0XC7,0XEC
?DW?0X114,0X13D,0X168,0X194
F_1209:
?DW?0X240,0X288,0X2CF,0X314,0X355,0X392,0X3CA,0X3FB,0X426,0X449,0X463,0X475,0X47E,0X47E,0X475,0X463,0X449,0X426,0X3FB,0X3CA
?DW?0X392,0X355,0X314,0X2CF,0X288,0X240,0X1F7,0X1B0,0X16B,0X12A,0XED,0XB5,0X84,0X59,0X36,0X1C,0XA,0X1,0X1,0XA
?DW?0X1C,0X36,0X59,0X84,0XB5,0XED,0X12A,0X16B,0X1B0,0X1F7
F_1336:
?DW?0X240,0X290,0X2DE,0X32A,0X371,0X3B2,0X3EC,0X41D,0X445,0X463,0X477,0X47F,0X47C,0X46E,0X456,0X432,0X405,0X3D0,0X392,0X34E
?DW?0X305,0X2B7,0X268,0X217,0X1C8,0X17A,0X131,0XED,0XAF,0X7A,0X4D,0X29,0X11,0X3,0X0,0X8,0X1C,0X3A,0X62,0X93
?DW?0XCD,0X10E,0X155,0X1A1,0X1EF
F_1477:
?DW?0X240,0X297,0X2ED,0X33F,0X38B,0X3CF,0X40A,0X43A,0X45E,0X475,0X47F,0X47C,0X46B,0X44D,0X423,0X3EE,0X3AE,0X366,0X317,0X2C3
?DW?0X26C,0X213,0X1BC,0X168,0X119,0XD1,0X91,0X5C,0X32,0X14,0X3,0X0,0XA,0X21,0X45,0X75,0XB0,0XF4,0X140,0X192
?DW?0X1E8
F_1633:
?DW?0X240,0X2A1,0X2FF,0X358,0X3A9,0X3F0,0X42A,0X456,0X473,0X47F,0X47B,0X466,0X442,0X40F,0X3CE,0X382,0X32D,0X2D1,0X270,0X20F
?DW?0X1AE,0X152,0XFD,0XB1,0X70,0X3D,0X19,0X4,0X0,0XC,0X29,0X55,0X8F,0XD6,0X127,0X180,0X1DE
;FREQ_INDEX is the adresss for the sin data
FREQ_COM_TBL?DW?F_697,F_770,F_852,F_941,F_1209,F_1336,F_1477,F_1633
TMR16_CON?DB?1
; 子程序=>>
DialOutController_Initial:
??ret
DialOutController_SetIndex:
?cp?r3,#0bh
?jp?UGT,_set_index_fail
?ld?_doc_index,r3
?jp?_set_index_exit
_set_index_fail:
?ld?r3,#0fh
?ld?_doc_index,r3?
_set_index_exit:
?ret
??
DialOutController_Int_TimerA:
?LD??R0,_sr_DA_OUT
?BITS?ADCON.5???
?LD??DADATA,R0
?LD??DADATA,R0
?LD??DADATA,R0
?LD??DADATA,R0
?BITS?_sr_DTMF_FLAG.bFINISH?
?ret
?
DialOutController_Int_DA:
?
?ret
????
;------------撥號程序>>----------------?
;??? PUBLIC _fun_DTMF_DIAL
;**********************************************
;*_FUN_DIAL
;*FUNCTION:?DIAL (NUMBER)
;*OUTPUT:?DTMF wave
;*HW STACK:?USED 1+1=2 LEVEL
;*SW STACK:?USED 0 BYTES
;*USED:??NUM_COUNTER,L_FQ_DA_NUM,H_FQ_DA_NUM,LOW_FREQ_I,HIGH_FREQ_I,LOW_F_CNTR,HIGH_F_CNTR,TIMECNTR
;*???IDH,IDL0,ILH,ILL,TBL,TBH,R0,R1,R2,R3_tr_MAC_TMP0[0-1]
;*????????? FLAG C(Z,NZ)
;**********************************************
;tempdata
STACK_SIZE?.SETVAR?0
_tm_LOWFDA_CNT??EQU?STACK_SIZE?;DA num in one cycle of? low frequency wave
STACK_SIZE?.SETVAR?STACK_SIZE+1
_tm_HIGFDA_CNT??EQU?STACK_SIZE?;DA num in one cycle of? high frequency wave
STACK_SIZE?.SETVAR?STACK_SIZE+1
_tm_LOWF_INDEX??EQU?STACK_SIZE?;STORE LOW FREQUENCY SIN DATA ADDRESS
STACK_SIZE?.SETVAR?STACK_SIZE+2
_tm_HIGF_INDEX??EQU?STACK_SIZE?;STORE HIGH FREQUENCY SIN DATA ADDRESS
STACK_SIZE?.SETVAR?STACK_SIZE+2
_tm_LOWF_CNTR??EQU?STACK_SIZE?;low freq counter
STACK_SIZE?.SETVAR?STACK_SIZE+1
_tm_HIGF_CNTR??EQU?STACK_SIZE?;high freq counter
STACK_SIZE?.SETVAR?STACK_SIZE+1
_tm_TIME_CNTR??EQU?STACK_SIZE?;counter to control the output time
STACK_SIZE?.SETVAR?STACK_SIZE+2
bDTMF_FINISH??EQU??bFINISH
;*--------------------------------------------------------------
; Func: _fun_DTMF_DIAL,
; Input: _doc_index, the number to dial out
;*--------------------------------------------------------------
DialOutController_DialOut:
??bitr?p4.0
??_macro_ALLOC STACK_SIZE
??
??ld?r3,#IS_TIMER_A_DIALOUT
??lcall?InterruptServer_Regist
??ld?r3,#IS_DA_DIALOUT
??lcall?InterruptServer_Regist
??
??ld?r3,_doc_index
??cp?r3,#0fh
??jp?z,_dial_out_exit
??
??BMS
??LD?R0, #
??LD?R0, #>DTRANS_TBL
??ADD?R0, R3
??LD?ILL, R0
??LDC?@IL
??LD?R2, TBL
??LD?R3, R2???; Get the DA count for the frequent combination
??SR?R3
??SR?R3
??AND?R2, #3???; R2 for high freq, R3 for low freq
??ADD?R2, #4
??LD?R0, #
??LD?R0, #>DACNT_TBL
??ADD?R0, R3
??LD?ILL, R0
??LDC?@IL
??LD?R0, TBL
??_macro_WRITE?_tm_LOWFDA_CNT, R0
??LD?R0, #>DACNT_TBL
??ADD?R0, R2
??LD?ILL, R0
??LDC?@IL
??LD?R0, TBL
??_macro_WRITE?_tm_HIGFDA_CNT, R0
??LD?R0, #
??LD?R0, #>FREQ_COM_TBL
??ADD?R0, R3
??LD?ILL, R0
??LDC?@IL
??LD?R0, TBH
??_macro_WRITE?_tm_LOWF_INDEX, R0
??LD?R0, TBL
??_macro_WRITE?_tm_LOWF_INDEX+1, R0
??LD?R0, #>FREQ_COM_TBL
??ADD?R0, R2
??LD?ILL, R0
??LDC?@IL
??LD?R0, TBH
??_macro_WRITE?_tm_HIGF_INDEX, R0
??LD?R0, TBL
??_macro_WRITE?_tm_HIGF_INDEX+1, R0
??LD?R0, #0
??_macro_WRITE?_tm_LOWF_CNTR, R0
??_macro_WRITE?_tm_HIGF_CNTR, R0
??_macro_WRITE?_tm_TIME_CNTR, R0
??_macro_WRITE?_tm_TIME_CNTR+1, R0
??BITS?_sr_DTMF_FLAG.bDIAL_INP
??
; Set the timer A for DTMF usage
??LD?R0, TACON
??PUSH?R0
??LD?R0, #43H??; timer A run, Fxx/1
??LD?TACON, R0
??LD?R0, TADATA
??PUSH?R0
??LD?R0, #134; the FREQ dividor
??LD?TADATA, R0
??BITS?ADCON.6???; Enable the DA int?
; Backup the interrupt setting
??DI
??LD?R0, IMR00
??PUSH?R0
??LD?R0, #00
??LD?IMR00, R0
??LD?R0, IMR01
??PUSH?R0
??LD?R0, #00
??LD?IMR01, R0
??LD?R0, IMR1
??PUSH?R0?
??LD?R0, #00?
??LD?IMR1, R0
; Initial the interrupt setting??
??BITS?ADCON.5????; Enable the AD/DA clk
??BITS?IMR00.0????; Enable the DA INT
??BITS?IMR00.1????; Enable timer A
??BITS?DACON.0????; Enable DA
??EI
; Dial out the DTMF wave
?DA_LOOP:
??_macro_READ?R2, _tm_LOWF_INDEX?; Get the low freq DA out
??_macro_READ?R0, _tm_LOWF_INDEX+1
??_macro_READ?R1, _tm_LOWF_CNTR
??ADD?R0, R1
??INCC?R2
??LD?ILH, R2
??LD?ILL, R0
??LDC?@IL
??LD?R0, TBL
??PUSH?R0
??LD?R1, TBH
??_macro_READ?R0, _tm_HIGF_INDEX?; Get the high freq DA out
??_macro_READ?R2, _tm_HIGF_INDEX+1
??_macro_READ?R3, _tm_HIGF_CNTR
??ADD?R2, R3
??INCC?R0
??LD?ILH, R0
??LD?ILL, R2
??LDC?@IL
??LD?R2, TBL
??LD?R3, TBH
??POP?R0
??ADD?R0, R2
??ADC?R1, R3
??SR?R1
??RRC?R0
??SR?R1
??RRC?R0
??SR?R1??
??RRC?R0
??_macro_READ?R1, _tm_LOWF_CNTR?; loop the DTMF wave
??INC?R1
??_macro_READ?R2, _tm_LOWFDA_CNT
??CP?R1, R2
??Jp?ULE, %F1
??LD?R1, #0
?%1:?
??_macro_WRITE?_tm_LOWF_CNTR, R1
??_macro_READ?R1, _tm_HIGF_CNTR
??INC?R1
??_macro_READ?R2, _tm_HIGFDA_CNT
??CP?R1, R2
??Jp?ULE, %F2
??LD?R1, #0
?%2:?
??_macro_WRITE?_tm_HIGF_CNTR, R1
??LD?_sr_DA_OUT, R0
?WAIT_DA:
??NOP?
??BITT?_sr_DTMF_FLAG.bFINISH
??Jp?Z, WAIT_DA
??BMS
??BITR?_sr_DTMF_FLAG.bFINISH
??_macro_READ?R0, _tm_TIME_CNTR?; output enough long time
??_macro_READ?R1, _tm_TIME_CNTR+1
??INC?R1
??INCC?R0
??_macro_WRITE?_tm_TIME_CNTR, R0
??_macro_WRITE?_tm_TIME_CNTR+1, R1
??CP?R1, #0
??Jp?NZ, DA_LOOP
??CP?R0, #cDIAL_TIME
??Jp?ULE, DA_LOOP
??
??LD?R0, #7FH???; output enough long empty time
??LD?_sr_DA_OUT, R0
?DTMF_WTIME:
??NOP?
??BITT?_sr_DTMF_FLAG.bDTMF_FINISH?
??Jp?Z, DTMF_WTIME
??BITR?_sr_DTMF_FLAG.bDTMF_FINISH
??_macro_READ?R0, _tm_TIME_CNTR
??_macro_READ?R1, _tm_TIME_CNTR+1
??INC?R1
??INCC?R0
??_macro_WRITE?_tm_TIME_CNTR, R0
??_macro_WRITE?_tm_TIME_CNTR+1, R1
??CP?R1, #0
??Jp?NZ, DTMF_WTIME
??CP?R0, #cDTSLI_TIME
??Jp?ULE, DTMF_WTIME
??
??BITR?_sr_DTMF_FLAG.bDIAL_INP
; Disable the DA clk and interrupt
??DI
??BITR?ADCON.5??; Disable the AD/DA clk
??BITR?DACON.0??; Disable the DA
; Restore the IMR??
??POP?R0
??LD?IMR1, R0
??POP?R0
??LD?IMR01, R0
??POP?R0
??LD?IMR00, R0
??POP?R0
??LD?TADATA, R0
??POP?R0
??LD?TACON, R0
??EI
??
_dial_out_exit:
??ld?r3,#IS_TIMER_A_DIALOUT
??lcall?InterruptServer_Unregist
??ld?r3,#IS_DA_DIALOUT
??lcall?InterruptServer_Unregist
??_macro_FREE STACK_SIZE
??bits?p4.0
??
??RET
.end
- 光貓撥號和路由器撥號哪個好 光貓撥號和路由器撥號的區(qū)別介紹 2次下載
- 光貓直連和光貓撥號有什么區(qū)別嗎 光貓撥號和不撥號區(qū)別 3次下載
- 傲軟投屏免費軟件資源下載 4次下載
- HT9170雙音頻DTMF接收器的數(shù)據(jù)手冊免費下載 19次下載
- dsPIC DSC DTMF 生成庫的詳細(xì)中文資料概述
- dsPIC33F DTMF檢測庫開發(fā)工具的詳細(xì)中文資料概述
- DTMF是什么? DTMF相關(guān)資料 0次下載
- DTMF信號的合成與識別 85次下載
- 基于MT8880的一鍵撥號電話系統(tǒng)設(shè)計 246次下載
- 電話自動撥號報警電路
- 試驗DTMF軟解碼
- 基于DTMF的解碼器設(shè)計
- 運用MC68HC05F6實現(xiàn)DTMF撥號、脈沖撥號、音樂保持
- 電話自動撥號報警電路圖
- 電話DTMF芯片相關(guān)資料
- 軟磁鐵氧體磁心的直流疊加特性 1202次閱讀
- 基于MT8870DE的電話電路 1765次閱讀
- SIM800C模塊和SIM900A模塊對比 2.4w次閱讀
- 基于CAN總線和DTMF技術(shù)的新型智能家居安防系統(tǒng)設(shè)計 1260次閱讀
- 一種基于DTMF收發(fā)技術(shù)和無線射頻技術(shù)相結(jié)合實現(xiàn)遠(yuǎn)程控制的方法淺析 1698次閱讀
- 基于PIC12C508 DTMF拔號程序編寫分享 1798次閱讀
- MCU軟復(fù)位原理詳解 9167次閱讀
- 基于撥號芯片MT8880的Linux內(nèi)核開放源代碼操作系統(tǒng)設(shè)計詳解 1925次閱讀
- 簡易型自動撥號器設(shè)計和工作原理介紹 7023次閱讀
- 軟包鋰電池脹氣怎么辦_軟包鋰電池脹氣還能用嗎 3.4w次閱讀
- 小波軟閾值的推導(dǎo)_軟閾值的計算 5008次閱讀
- 音頻撥號和脈沖撥號的區(qū)別 1.1w次閱讀
- 脈沖撥號是什么_脈沖撥號的應(yīng)用 7972次閱讀
- 自己制作DTMF譯碼數(shù)字顯示器 2613次閱讀
- 雙音多頻DTMF技術(shù)在DSP系統(tǒng)的實現(xiàn) 3688次閱讀
下載排行
本周
- 1HFSS電磁仿真設(shè)計應(yīng)用詳解PDF電子教程免費下載
- 24.30 MB | 126次下載 | 1 積分
- 2H橋中的電流感測
- 545.39KB | 7次下載 | 免費
- 3雷達(dá)的基本分類方法
- 1.25 MB | 4次下載 | 4 積分
- 4I3C–下一代串行通信接口
- 608.47KB | 3次下載 | 免費
- 5電感技術(shù)講解
- 827.73 KB | 2次下載 | 免費
- 6從 MSP430? MCU 到 MSPM0 MCU 的遷移指南
- 1.17MB | 2次下載 | 免費
- 7有源低通濾波器設(shè)計應(yīng)用說明
- 1.12MB | 2次下載 | 免費
- 8RA-Eco-RA2E1-48PIN-V1.0開發(fā)板資料
- 35.59 MB | 2次下載 | 免費
本月
- 12024年工控與通信行業(yè)上游發(fā)展趨勢和熱點解讀
- 2.61 MB | 763次下載 | 免費
- 2HFSS電磁仿真設(shè)計應(yīng)用詳解PDF電子教程免費下載
- 24.30 MB | 126次下載 | 1 積分
- 3繼電保護(hù)原理
- 2.80 MB | 36次下載 | 免費
- 4正激、反激、推挽、全橋、半橋區(qū)別和特點
- 0.91 MB | 32次下載 | 1 積分
- 5labview實現(xiàn)DBC在界面加載配置
- 0.57 MB | 21次下載 | 5 積分
- 6在設(shè)計中使用MOSFET瞬態(tài)熱阻抗曲線
- 1.57MB | 15次下載 | 免費
- 7GBT 4706.1-2024家用和類似用途電器的安全第1部分:通用要求
- 7.43 MB | 13次下載 | 免費
- 8PADS-3D庫文件
- 2.70 MB | 10次下載 | 2 積分
總榜
- 1matlab軟件下載入口
- 未知 | 935113次下載 | 10 積分
- 2開源硬件-PMP21529.1-4 開關(guān)降壓/升壓雙向直流/直流轉(zhuǎn)換器 PCB layout 設(shè)計
- 1.48MB | 420061次下載 | 10 積分
- 3Altium DXP2002下載入口
- 未知 | 233084次下載 | 10 積分
- 4電路仿真軟件multisim 10.0免費下載
- 340992 | 191360次下載 | 10 積分
- 5十天學(xué)會AVR單片機與C語言視頻教程 下載
- 158M | 183329次下載 | 10 積分
- 6labview8.5下載
- 未知 | 81578次下載 | 10 積分
- 7Keil工具M(jìn)DK-Arm免費下載
- 0.02 MB | 73804次下載 | 10 積分
- 8LabVIEW 8.6下載
- 未知 | 65985次下載 | 10 積分
評論
查看更多