; ;----------------------------------------------------------------------------------------- ; Sample program for the VA INC to simulate th MPR card ;----------------------------------------------------------------------------------------- ; ; WAIT 22 us ;-------------------------------------------------------- ;-- Init the DSPs -- ;-------------------------------------------------------- CARD RD 00000 100000000 10000000 ; read #100h -> card ID WAIT 290 ns CARD WR 00000 100000101 10000000 ; write #105h -> Set DSP in program mode WAIT 300 ns CARD WR 00000 100000110 00000001 ; write #106h -> DSP reset = high WAIT 300 ns ;-------------------------------------------------------- ;-- Programm the DSP1 -- ;-------------------------------------------------------- CARD RD 00000 100001001 10000000 ; read #109h -> DSP1 ISR reg. WAIT 300 ns CARD RD 00000 100000000 10000000 ; read #100h -> card ID WAIT 300 ns CARD WR 00000 100010001 10101100 ; write #111h -> #ACh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010000 01010011 ; write #110h -> #53h WAIT 300 ns WAIT 300 ns CARD WR 00000 100001000 11001111 ; write #108h -> #CFh NOP_ ns CARD RD 00000 100001001 10000000 ; read #109h -> DSP1 ISR reg. WAIT 300 ns CARD WR 00000 100010001 11001100 ; write #111h -> #CCh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010000 00110011 ; write #110h -> #33h WAIT 300 ns WAIT 300 ns CARD WR 00000 100001000 01000100 ; write #108h -> #44h WAIT 300 ns NOP_ ns CARD RD 00000 100001001 10000000 ; read #109h -> DSP1 ISR reg. WAIT 300 ns CARD WR 00000 100010001 10101100 ; write #111h -> #ACh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010000 01010011 ; write #110h -> #53h WAIT 300 ns CARD WR 00000 100001000 11001111 ; write #108h -> #CFh WAIT 300 ns NOP_ ns ;-------------------------------------------------------- ;-- Programm the DSP2 -- ;-------------------------------------------------------- CARD RD 00000 100001011 10000000 ; read #10Bh -> DSP2 ISR reg. WAIT 300 ns CARD WR 00000 100010011 10101100 ; write #113h -> #ACh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010010 01010011 ; write #112h -> #53h WAIT 300 ns WAIT 300 ns CARD WR 00000 100001010 11001111 ; write #10Ah -> #CFh NOP_ ns CARD RD 00000 100001011 10000000 ; read #10Bh -> DSP2 ISR reg. WAIT 300 ns CARD WR 00000 100010011 11001100 ; write #113h -> #CCh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010010 00110011 ; write #112h -> #33h WAIT 300 ns WAIT 300 ns CARD WR 00000 100001010 01000100 ; write #10Ah -> #44h WAIT 300 ns NOP_ ns CARD RD 00000 100001011 10000000 ; read #10Bh -> DSP2 ISR reg. WAIT 300 ns CARD WR 00000 100010011 10101100 ; write #113h -> #ACh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010010 01010011 ; write #112h -> #53h WAIT 300 ns CARD WR 00000 100001010 11001111 ; write #10Ah -> #CFh WAIT 300 ns NOP_ ns ;-------------------------------------------------------- ;-- Programm the DSP3 -- ;-------------------------------------------------------- CARD RD 00000 100001101 10000000 ; read #10Dh -> DSP3 ISR reg. WAIT 300 ns CARD WR 00000 100010101 10101100 ; write #115h -> #ACh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010100 01010011 ; write #114h -> #53h WAIT 300 ns WAIT 300 ns CARD WR 00000 100001100 11001111 ; write #10Ch -> #CFh NOP_ ns CARD RD 00000 100001101 10000000 ; read #10Dh -> DSP3 ISR reg. WAIT 300 ns CARD WR 00000 100010101 11001100 ; write #115h -> #CCh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010100 00110011 ; write #114h -> #33h WAIT 300 ns WAIT 300 ns CARD WR 00000 100001100 01000100 ; write #10Ch -> #44h WAIT 300 ns NOP_ ns CARD RD 00000 100001101 10000000 ; read #10Dh -> DSP3 ISR reg. WAIT 300 ns CARD WR 00000 100010101 10101100 ; write #115h -> #ACh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010100 01010011 ; write #114h -> #53h WAIT 300 ns CARD WR 00000 100001100 11001111 ; write #10Ch -> #CFh WAIT 300 ns NOP_ ns ;-------------------------------------------------------- ;-- Programm the DSP4 -- ;-------------------------------------------------------- CARD RD 00000 100001111 10000000 ; read #10Fh -> DSP4 ISR reg. WAIT 300 ns CARD WR 00000 100010111 10101100 ; write #117h -> #ACh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010110 01010011 ; write #116h -> #53h WAIT 300 ns WAIT 300 ns CARD WR 00000 100001110 11001111 ; write #10Eh -> #CFh NOP_ ns CARD RD 00000 100001111 10000000 ; read #10Fh -> DSP4 ISR reg. WAIT 300 ns CARD WR 00000 100010111 11001100 ; write #117h -> #CCh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010010 00110011 ; write #116h -> #33h WAIT 300 ns WAIT 300 ns CARD WR 00000 100001110 01000100 ; write #10Eh -> #44h WAIT 300 ns NOP_ ns CARD RD 00000 100001111 10000000 ; read #10Fh -> DSP4 ISR reg. WAIT 300 ns CARD WR 00000 100010111 10101100 ; write #117h -> #ACh WAIT 300 ns WAIT 300 ns CARD WR 00000 100010110 01010011 ; write #116h -> #53h WAIT 300 ns CARD WR 00000 100001110 11001111 ; write #10Eh -> #CFh WAIT 300 ns NOP_ ns ;-------------------------------------------------------- ;-- Programming finished -- ;-------------------------------------------------------- CARD WR 00000 100000101 00000000 ; write #105h -> Set DSP in normal mode WAIT 1200 ns ;-------------------------------------------------------- ;-- DSP programmed - write frequency to #102 -- ;-------------------------------------------------------- CARD RD 00000 100000010 10000000 ; read #102h -> read DSP not ready WAIT 300 ns CARD WR 00000 100000010 10000011 ; write #102h -> set frequency to 48kHz WAIT 300 ns CARD RD 00000 111111011 10000000 ; read #1FBh -> read acknowledge register WAIT 300 ns ;-------------------------------------------------------- ;-- write to #1FE -- ;-------------------------------------------------------- CARD RD 00000 100000010 10000000 ; read #102h -> read DSP not ready WAIT 300 ns CARD WR 00000 111111110 00000001 ; write #1FEh -> 01h WAIT 300 ns CARD RD 00000 111111011 10000000 ; read #1FBh -> read acknowledge register WAIT 300 ns NOP_ ns ;-------------------------------------------------------- ;-- Write complete parameter set -- ;-------------------------------------------------------- CARD WR 00000 100010000 00000001 ; write #110h -> #01h WAIT 300 ns CARD WR 00000 100010001 00000010 ; write #111h -> #02h WAIT 300 ns CARD WR 00000 100010010 00000011 ; write #112h -> #03h WAIT 300 ns CARD WR 00000 100010011 00000100 ; write #113h -> #04h WAIT 300 ns CARD WR 00000 100010100 00000101 ; write #114h -> #05h WAIT 300 ns CARD WR 00000 100010101 00000110 ; write #115h -> #06h WAIT 300 ns CARD WR 00000 100010110 00000111 ; write #116h -> #07h WAIT 300 ns CARD WR 00000 100010111 00001000 ; write #117h -> #08h WAIT 300 ns CARD WR 00000 100011000 00001001 ; write #118h -> #09h WAIT 300 ns CARD WR 00000 100011001 00001010 ; write #119h -> #0Ah WAIT 300 ns CARD WR 00000 100011010 00001011 ; write #11Ah -> #0Bh WAIT 300 ns CARD WR 00000 100011011 00001100 ; write #11Bh -> #0Ch WAIT 300 ns CARD WR 00000 100011100 00001101 ; write #11Ch -> #0Dh WAIT 300 ns CARD WR 00000 100011101 00001110 ; write #11Dh -> #0Eh WAIT 300 ns CARD WR 00000 100011110 00001111 ; write #11Eh -> #0Fh WAIT 300 ns CARD WR 00000 100011111 00010000 ; write #11Fh -> #10h WAIT 300 ns ; CARD WR 00000 111111111 00110110 ; write #1FFh -> #66h WAIT 300 ns CARD RD 00000 111111011 10000000 ; read #1FBh -> read acknowledge register WAIT 300 ns NOP_ ns