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 |