📄 aic_cfg.asm
字号:
*******************************************************************************
* MODULE NAME: aic_cfg.asm *
* *
* AUTHOR: Nathan Baltz *
* *
* DESCRIPTION: Writes new configuration data into the AC01. Assuming a system *
* which processes speech signals and requires the following parameters: *
* *
* Low pass filter cut-off frequency = 3.6 kHz *
* Sampling rate = 9600 Hz *
* Assume the Master clock MCLK = 10.368 MHz *
* *
* This example demonstrates how to program these parameters - the registers *
* affected are: *
* *
* Register A which determines the division of the MCLK frequency to *
* generate the internal filter clock FCLK. It also determines the -3 *
* dB corner frequency of the low-pass filter. *
* Register B which determines the division of FCLK to generate the *
* sampling (conversion) frequency. It also determines the -3dB corner *
* frequency of the high-pass filter *
* *
* DATE: Summer 1996 *
* *
*******************************************************************************
* (C) COPYRIGHT TEXAS INSTRUMENTS, INC. 1996 *
*******************************************************************************
.mmregs
.include "aic_cfg.inc"
.def wrt_cnfg
.def wait_xrdy
.text
wrt_cnfg:
STM #K_0,DXR1 ;primary data word - a jump start!
CALL wait_xrdy
STM #K_PRIM_WORD,DXR1 ;send primary word with D01-D00 = 11 to
;signify secondary communication
CALL wait_xrdy ;wait for data to be copied from DXR to XSR
STM #K_REG_1,DXR1 ;change A register
CALL wait_xrdy
STM #K_PRIM_WORD,DXR1
CALL wait_xrdy
STM #K_REG_2,DXR1 ;change B register
CALL wait_xrdy
RET
;****************************************************************************
; MODULE: WAIT_XRDY
; PURPOSE: Wait for data to be copied from DXR to XSR before the next
; data is sent to DXR
;****************************************************************************
wait_xrdy:
BITF SPC1,0800h ;test XRDY bit in SPC1
BC wait_xrdy,NTC ;loop if not set
RET
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -