⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aic_cfg.asm

📁 声音均衡器的源代码程序
💻 ASM
字号:
*****************************************************************************
*  MODULE NAME:   AIC_CFG.ASM                                               *
*  PURPOSE:       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 = 10.4   kHz                           *
*  Sampling rate                     = 23.1   kHz                           *
*  Assume the Master clock MCLK      = 10.000 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.                                *
*****************************************************************************
	.mmregs

	.text
	
wrt_cnfg:
	TDXR = #K_0                ;primary data word - a jump start!
	call   wait_xrdy
	TDXR = #K_PRIM_WORD                     ;send primary word with D01-D00 = 11 to 
                              ;signify secondary communication
   call   wait_xrdy           ;wait for data to be copied from DXR to XSR
	TDXR = #K_REG_1                         ;change A register
	call   wait_xrdy
	TDXR = #K_PRIM_WORD
	call   wait_xrdy
	TDXR = #K_REG_2                         ;change B register
	call   wait_xrdy
	return
;****************************************************************************
;	MODULE: WAIT_XRDY
;	PURPOSE: Wait for data to be copied from DXR to XSR before the next
;		 data is sent to DXR
;****************************************************************************
wait_xrdy:
	TC = bitf(@TSPC,0800h)                  ;test XRDY bit in SPC1
	if (NTC) goto wait_xrdy                 ;loop if not set
	return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -