Motorola DSP56000 Macro Cross Assembler Version 2.03 89-08-04 15:58:57 loopevb.asm Page 1 1 2 ;************************************************************ 3 ; file:loopevb.asm * 4 ; * 5 ; Simple read ADC write DAC loop... * 6 ; reads DSP56ADC16 data and writes to PCM-56 * 7 ; * 8 ;************************************************************ 9 ; Written by Charlie Thompson 10/19/88 -- Rev 1.0 11/1/88 10 11 opt nomd,nocex,nocm,nomex 12 13 page 132 14 15 ; Program start address 16 17 P:0040 org p:$40 18 19 ; Set up ADS board in case of force break instead of force reset 20 21 P:0040 08F4BE movep #0,x:$FFFE ;set bcr to zero 000000 22 P:0042 0500BB movec #0,sp ;init stack pointer 23 P:0043 0500B9 movec #0,sr ;clear loop flag 24 25 ; Set up the SSI for operation with the DSP56ADC16EVB 26 ; The following code sets port C to function as SCI/SSI 27 28 P:0044 280000 move #$0,a0 ;zero PCC to cycle it 29 P:0045 08C821 movep a0,x:$FFE1 30 31 P:0046 50F400 move #$0001ff,a0 0001FF 32 P:0048 08C821 movep a0,x:$FFE1 ;write PCC 33 34 ; The following code sets the SSI CRA and CRB control registers for external 35 ; continuous clock, synchronous, normal mode. 36 37 P:0049 50F400 move #$004000,a0 ;CRA pattern for word length=16 bits 004000 38 P:004B 08C82C movep a0,x:$FFEC 39 40 P:004C 50F400 move #$003200,a0 ;CRB pattern for continous ck,sych,normal mode 003200 41 P:004E 08C82D movep a0,x:$FFED ;word long frame sync: FSL=0;ext ck/fs 42 43 44 45 ;************************************************************************ 46 ; Actual read A/D and write D/A -- insert application code as indicated * 47 ;************************************************************************ 48 49 ; The following code polls the RDF flag in the SSI-SR and waits for RDF=1 50 ; and then reads the RX register to retrieve the data from the A/D converter. 51 ; Sample rate is controlled by DSP56ADC16 board. 52 53 54 55 56 P:004F 0AAE87 poll jclr #7,x:$FFEE,poll ;loop until RDF bit = 1 00004F 57 P:0051 084E2F movep x:$FFEF,a ;get A/D converter data Motorola DSP56000 Macro Cross Assembler Version 2.03 89-08-04 15:58:57 loopevb.asm Page 2 58 59 60 ; Write DSP56ADC16 A/D converter data to the PCM-56 61 62 P:0052 567000 move a,x:$FFEF ;write the PCM-56 D/A via SSI xmt reg. 00FFEF 63 P:0054 0C004F jmp poll ;loop indefinitely 64 65 end 0 Errors 0 Warnings