Board logo

标题: 求助,那位大虾用过aic10这个音频芯片 [打印本页]

作者: hunterinhunting    时间: 2004-6-1 09:09     标题: 求助,那位大虾用过aic10这个音频芯片

希望能给小弟介绍一下它的工作模式,或者把您使用它时的代码给我看一下。谢谢
作者: 一通百通    时间: 2004-6-1 09:09     标题: AIC10 音频芯片源代码

xf = 0 ; reset ac01 tcr = #10h ; stop timer tspc = #0008h ; stop TDM serial port ifr = #080h ; clear flag from IFR tdxr = #0h ; send 0 as first xmit word tcsr = #1 tspc = #00c8h ; reset and start TDM serial port xf = 1 ; release ac01 from reset ; AIC CONFIGURATION TDXR = #0003h ; primary - secondary comm coming CALL WaitXRDY A = @FS_MODE A = A << -8 ; A value in upper half of FS_MODE A = A | #0100h TDXR = A ; secondary 1 - Reg A CALL WaitXRDY TDXR = #0003h ; primary - secondary comm coming CALL WaitXRDY A = @FS_MODE ; get sampling rate setting from host (or other source) A = A & #0FFh ; B value in low half of FS_MODE A = A | #0200h TDXR = A ; secondary 1 - Reg A CALL WaitXRDY TDXR = #0003h ; primary - secondary comm coming CALL WaitXRDY TDXR = #0300h ; secondary 3 - default CALL WaitXRDY TDXR = #0003h ; primary - secondary comm coming CALL WaitXRDY TDXR = #0409h ; secondary 4 - Amplifier Gain Select ; TDXR = #040dh ; secondary 4 - Amplifier Gain Select ; Monitor = squelch ; Input = 6 dB ; Output = 0 dB CALL WaitXRDY TDXR = #0003h ; primary - secondary comm coming CALL WaitXRDY ; TDXR = #0505h ; secondary 5 - Analog Config TDXR = #0501h ; secondary 5 - Analog Config (default) ; HighPass disabled ; IN CALL WaitXRDY TDXR = #0003h ; primary - secondary comm coming CALL WaitXRDY TDXR = #0600h ; secondary 6 - default CALL WaitXRDY TDXR = #0003h ; primary - secondary comm coming CALL WaitXRDY TDXR = #0700h ; secondary 7 - default CALL WaitXRDY TDXR = #0003h ; primary - secondary comm coming CALL WaitXRDY TDXR = #0801h ; secondary 8 - default CALL WaitXRDY TDXR = #0 ; return to neutral (operating) state CALL WaitXRDY A = TRCV ; clear out receive buffer TDXR = #0 CALL WaitXRDY A = TRCV RETURN ; wait for xmit buffer to be emptied (output) WaitXRDY: A = TSPC A = A & #0800H IF (AEQ) GOTO WaitXRDY RETURN




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0