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

📄 init_ser.asm

📁 声音均衡器的源代码程序
💻 ASM
字号:
*****************************************************************************
* FILENAME: INIT_SER.ASM
* This program configures the AC01 to a 9.6KHz sampling rate.
*****************************************************************************

K_TCR           .set     14h                     ; Timer Control Register
K_0             .set     0h
K_8000          .set     8000h

                .text
serial_init:
                XF=0
*****************************************************************************
* We need at least 12 cycles to pull the AIC out of reset. Only 6 cycles
* have been used.
*****************************************************************************
                TSPC = #K_SERIAL_RST             ; reset the serial port with
                                                 ; 0000 0000 0000 1000 
                intm	=0

		TSPC = #K_SERIAL_OUT_RST         ; bring ser.port out of reset with
                                                 ; 0000 0000 1100 1000
* Write some value to DXR1 (the AC01 on the EVM is connected to serial port 1)
	
                IMR = #K_IMR                     ; Enable RINT1
                                                 ; 0000 0000 0100 0000
                IFR = #K_IMR                     ; clear RINT1
	
                TDXR = #K_0
                                                 ; 0000 0000 0100 0000
                nop                              ; this guarantees that the AIC
		goto	$+1                      ; is held for at least 12 cycles
                goto	$+1                      ; in reset
* Pull the AC01 out of reset - the AC01 requires that it be held in reset for
* 1 MCLK, which is equivalent to 96.45ns (based on an MCLK of 10.368MHz)

                dreturn
                nop
		XF=1				 ; AIC out of reset 
          

⌨️ 快捷键说明

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