Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 1 1 ;*************************************************************************** 2 ; VOICEDLT.ASM DSP56303 EVB program for Computer Applications Lab 3 ; Voice Processing Delta-Modulation Experiment 4 ; 5 ; Authors: Ellery Blood (original) 6 ; John Cogdell (added D4 mode) 7 ; Russell Kraft (corrected errors, additional features) 8 ; 9 ;10/23/2002 Assemble with the command: 10 ; asm56300 -a -bVOICEDLT.CLD -lVOICEDLT.LST VOICEDLT.ASM 11 ; 12 ; This program simulates two methods for recording andplaying back audio 13 ; in a digital format. The first method is basic storing of sampled data values 14 ; and fetching for playback. The mode of sampling can be represented with 1 bit 15 ; per sample (the most coarse, but most compact) to 16 bits per sample (the 16 ; finest, but least compact). The second method is delta modulation, which 17 ; records the changes between adjacent values. Depending on the mode, 18 ; it can use either 1, 2, or 3 bits per sample. The coarseness is determined 19 ; by the minimum step size of the response. 20 ; 21 ; brings data in through CODEC, samples it at 1-16 bits, and sends back out the CODEC 22 ;*************************************************************************** 1086 1087 ;****************************************************************************** 1088 1089 ;---Buffer for talking to the CS4215 1090 1091 X:000000 org x:0 1092 RX_BUFF_BASE 1093 000000 equ * 1094 RX_data_1_2 1095 X:000000 ds 1 ;data time slot 1/2 for RX ISR 1096 RX_data_3_4 1097 X:000001 ds 1 ;data time slot 3/4 for RX ISR 1098 RX_data_5_6 1099 X:000002 ds 1 ;data time slot 5/6 for RX ISR 1100 RX_data_7_8 1101 X:000003 ds 1 ;data time slot 7/8 for RX ISR 1102 1103 TX_BUFF_BASE 1104 000004 equ * 1105 TX_data_1_2 1106 X:000004 ds 1 ;data time slot 1/2 for TX ISR 1107 TX_data_3_4 1108 X:000005 ds 1 ;data time slot 3/4 for TX ISR 1109 TX_data_5_6 1110 X:000006 ds 1 ;data time slot 5/6 for TX ISR 1111 TX_data_7_8 1112 X:000007 ds 1 ;data time slot 7/8 for TX ISR 1113 1114 X:000008 RX_PTR ds 1 ;Pointer for rx buffer 1115 X:000009 TX_PTR ds 1 ;Pointer for tx buffer 1116 1117 ;TONE_OUTPUT equ HEADPHONE_EN+LINEOUT_EN+(4*LEFT_ATTN)+(4*RIGHT_ATTN) 1118 ;TONE_INPUT equ MIC_IN_SELECT+(15*MONITOR_ATTN) 1119 ;CTRL_WD_12 equ NO_PREAMP+HI_PASS_FILT+SAMP_RATE_48+STEREO+DATA_16 ;CLB=0 Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 2 1120 ;CTRL_WD_34 equ IMMED_3STATE+XTAL1_SELECT+BITS_64+CODEC_MASTER 1121 ;CTRL_WD_56 equ $000000 1122 ;CTRL_WD_78 equ $000000 1123 1124 ; These following values are defined in the file ada_equ.asm - 1125 ; output attenuation is nominally 0dB, input gain is nominally 7.5dB 1126 000300 CTRL_WD_12 equ MIN_LEFT_ATTN+MIN_RIGHT_ATTN+LIN2+RIN2 1127 550000 CTRL_WD_34 equ LEFT_GAIN+RIGHT_GAIN ;Needed to offset system's V gain of 0.275 1128 ;CTRL_WD_34 equ MIN_LEFT_GAIN+MIN_RIGHT_GAIN 1129 1130 1131 P:000050 org p:$50 ;SCI Recieve Data Interrupt 1132 P:000050 0BF080 jsr ISCIRD 0001F6 1133 1134 P:000100 org p:$100 1135 START 1136 main 1137 P:000100 08F4BD movep #$040003,x:M_PCTL ;set PLL for MPY of 4X 040003 1138 P:000102 08F4BB movep #$012421,x:M_BCR ;set up one ext. wait state for all AAR areas 012421 1139 P:000104 0003F8 ori #3,mr ;mask interrupts 1140 P:000105 0500BB movec #0,sp ;clear hardware stack pointer 1141 P:000106 0500BA move #0,omr ;operating mode 0 1142 P:000107 364000 move #$40,r6 ;initialise stack pointer 1143 P:000108 05F426 move #-1,m6 ;linear addressing FFFFFF 1144 P:00010A 0BF080 jsr ada_init ;initialize codec 00034A 1145 1146 1147 ; initialize SCI 1148 ; 10-bit asynchronous mode 1149 ; enable reciever and transmitter 1150 P:00010C 07F41C movep #$000B02,x:M_SCR ;SCI control register 000B02 1151 ; set interrupt priority for SCI RECV to 1 1152 P:00010E 56F000 move x:M_IPRP,a ;grab register current value FFFFFE 1153 ; enable tx and rx pins 1154 P:000110 07F41F movep #$000003,x:M_PCRE ;Port E Control Register 000003 1155 P:000112 0140C2 or #000080,a ;set bits for interrupt priority 2 000050 1156 ; Reciever/Transmitter clocks use external clock from SCLK 1157 P:000114 07F41B movep #$00C000,x:M_SCCR ;SCI Clock Control Register 00C000 1158 P:000116 567000 move a,x:M_IPRP ;put value in interrupt priority peripheral register FFFFFE 1159 1160 ; print a greeting and instructions 1161 P:000118 65F400 move #greet,r5 00004F 1162 P:00011A 0BF080 jsr print 0001CD Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 3 1163 1164 loop_1 1165 1166 P:00011C 01B7A2 jset #2,x:M_SSISR0,* ;wait for frame sync to pass 00011C 1167 P:00011E 01B782 jclr #2,x:M_SSISR0,* ;wait for frame sync 00011E 1168 1169 P:000120 568000 move x:RX_BUFF_BASE,a ;receive left 1170 P:000121 578100 move x:RX_BUFF_BASE+1,b ;receive right 1171 P:000122 0BF080 jsr process_stereo 00012D 1172 P:000124 560400 move a,x:TX_BUFF_BASE ;transmit left 1173 P:000125 570500 move b,x:TX_BUFF_BASE+1 ;transmit right 1174 1175 P:000126 46F400 move #CTRL_WD_12,y0 ;set up control words 000300 1176 P:000128 460600 move y0,x:TX_BUFF_BASE+2 1177 P:000129 46F400 move #CTRL_WD_12,y0 000300 1178 P:00012B 460700 move y0,x:TX_BUFF_BASE+3 1179 1180 P:00012C 0C011C jmp loop_1 1181 1182 1183 process_stereo 1184 1185 P:00012D 5E7000 move a,y:newa ;store new right channel value 000021 1186 P:00012F 5F7000 move b,y:newb ;store new left channel value 000022 1187 1188 P:000131 5EF000 move y:count,a 000001 1189 P:000133 5FF000 move y:divider,b ;check divide counter 000000 1190 P:000135 0140C0 add #>$1,a 000001 1191 P:000137 200005 cmp b,a 1192 P:000138 0D1041 bge proc 000009 1193 P:00013A 5E7000 move a,y:count ;increment divide counter 000001 1194 P:00013C 5EF000 move y:olda,a 00001F 1195 P:00013E 5FF000 move y:oldb,b 000020 1196 P:000140 00000C rts 1197 1198 P:000141 2E0000 proc move #0,a ;reset divide counter 1199 P:000142 000000 nop 1200 P:000143 5E7000 move a,y:count 000001 1201 P:000145 5EF000 move y:mode,a 000026 1202 P:000147 200003 tst a Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 4 1203 P:000148 0D1042 bne delta 000016 1204 1205 1206 P:00014A 2F8000 move #$800000,b ;initial mask 1207 P:00014B 4CF000 move y:masksz,x0 00001D 1208 P:00014D 0C1E79 asr x0,b,b ;shift the mask 1209 P:00014E 000000 nop 1210 P:00014F 5F7000 move b,y:mask 000025 1211 1212 P:000151 5EF000 move y:newa,a 000021 1213 P:000153 5FF000 move y:newb,b 000022 1214 1215 P:000155 4EF000 move y:mask,y0 000025 1216 P:000157 200056 and y0,a 1217 P:000158 20005E and y0,b 1218 P:000159 5E7000 move a,y:olda 00001F 1219 P:00015B 5F7000 move b,y:oldb 000020 1220 P:00015D 00000C rts 1221 1222 1223 delta 1224 ; debug 1225 P:00015E 4EF000 move y:diff,y0 ;load max delta mask into y0 00001C 1226 P:000160 4CF000 move y:masksz,x0 00001D 1227 1228 P:000162 5EF000 move y:newa,a 000021 1229 P:000164 5FF000 move y:olda,b ;new in a, old in b 00001F 1230 1231 P:000166 200014 sub b,a ;get difference 1232 P:000167 000000 nop 1233 P:000168 5E7000 move a,y:temp ;hold difference in temp 00001E 1234 P:00016A 200026 abs a ;check to see if it is in range 1235 P:00016B 200055 cmp y0,a 1236 P:00016C 0D1049 blt smalla 000003 1237 P:00016E 20CE00 move y0,a 1238 1239 P:00016F 0C1E68 smalla asr x0,a,a 1240 P:000170 0C1C0C asr #6,a,a 1241 P:000171 014786 and #7,a ;I should be able to remove this 1242 P:000172 4CF000 move y:coefloc,x0 000177 1243 P:000174 200040 add x0,a Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 5 1244 P:000175 4CF000 move y:masksz,x0 00001D 1245 P:000177 21D500 move a,r5 1246 P:000178 000000 nop 1247 P:000179 000000 nop 1248 P:00017A 000000 nop 1249 P:00017B 5EE500 move y:(r5),a 1250 P:00017C 000000 nop 1251 P:00017D 0C1E48 asl x0,a,a 1252 P:00017E 0C1D0C asl #6,a,a 1253 1254 P:00017F 5FF000 move y:temp,b 00001E 1255 P:000181 20000B tst b 1256 P:000182 0D1047 bgt posa 000008 1257 1258 ; move y:diff,a 1259 P:000184 200036 neg a 1260 P:000185 000000 nop 1261 P:000186 5E7000 move a,y:temp 00001E 1262 P:000188 0D10C0 bra gooda 000004 1263 posa 1264 ; move y:diff,a 1265 P:00018A 5E7000 move a,y:temp 00001E 1266 P:00018C 5EF000 gooda move y:temp,a 00001E 1267 P:00018E 5FF000 move y:olda,b 00001F 1268 P:000190 200010 add b,a ;add delta back in 1269 P:000191 000000 nop 1270 P:000192 5E7000 move a,y:olda ;store new value 00001F 1271 1272 1273 P:000194 4CF000 move y:masksz,x0 00001D 1274 P:000196 5EF000 move y:newb,a 000022 1275 P:000198 5FF000 move y:oldb,b ;new in a, old in b 000020 1276 1277 P:00019A 200014 sub b,a ;get difference 1278 P:00019B 000000 nop 1279 P:00019C 5E7000 move a,y:temp ;hold difference in temp 00001E 1280 P:00019E 200026 abs a ;check to see if it is in range 1281 P:00019F 200055 cmp y0,a 1282 P:0001A0 0D1049 blt smallb 000003 1283 P:0001A2 20CE00 move y0,a 1284 1285 P:0001A3 0C1E68 smallb asr x0,a,a Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 6 1286 P:0001A4 0C1C0C asr #6,a,a 1287 P:0001A5 014786 and #7,a ;I should be able to remove this 1288 P:0001A6 4CF000 move y:coefloc,x0 000177 1289 P:0001A8 200040 add x0,a 1290 P:0001A9 4CF000 move y:masksz,x0 00001D 1291 P:0001AB 21D500 move a,r5 1292 P:0001AC 000000 nop 1293 P:0001AD 000000 nop 1294 P:0001AE 000000 nop 1295 P:0001AF 5EE500 move y:(r5),a 1296 P:0001B0 000000 nop 1297 P:0001B1 0C1E48 asl x0,a,a 1298 P:0001B2 0C1D0C asl #6,a,a 1299 1300 P:0001B3 5FF000 move y:temp,b 00001E 1301 P:0001B5 20000B tst b 1302 P:0001B6 0D1047 bgt posb 000008 1303 1304 ; move y:diff,a 1305 P:0001B8 200036 neg a 1306 P:0001B9 000000 nop 1307 P:0001BA 5E7000 move a,y:temp 00001E 1308 P:0001BC 0D10C0 bra goodb 000004 1309 posb 1310 ; move y:diff,a 1311 P:0001BE 5E7000 move a,y:temp 00001E 1312 P:0001C0 5EF000 goodb move y:temp,a 00001E 1313 P:0001C2 5FF000 move y:oldb,b 000020 1314 P:0001C4 200010 add b,a ;add delta back in 1315 P:0001C5 000000 nop 1316 P:0001C6 5E7000 move a,y:oldb ;store new value 000020 1317 1318 P:0001C8 5EF000 move y:olda,a 00001F 1319 P:0001CA 5FF000 move y:oldb,b 000020 1320 1321 P:0001CC 00000C rts 1322 1323 1324 ; print subroutine takes address in register r5 1325 ; exits when most significant byte is zero 1326 ; ignores zeros in lower bytes 1327 ; clobbers accumulator A and B and register r5 1328 print 1329 Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 7 1330 ; Next 2 lines used in Cogdell mode (D4) 1331 P:0001CD 5E7000 move a,y:backa 000023 1332 P:0001CF 5F7000 move b,y:backb 000024 1333 1334 P:0001D1 5EDD00 prbegin move y:(r5)+,a 1335 ; cmp #$00ffff,a ;check to see if done (char=$00) 1336 ; blt prend 1337 P:0001D2 014085 cmp #$000000,a ;check to see if done (char=$00) 1338 P:0001D3 0D104A beq prend 000022 1339 P:0001D5 019381 jclr #1,x:M_SSR,* ;wait for tx to finish 0001D5 1340 P:0001D7 019380 jclr #0,x:M_SSR,* ;wait for tx to finish 0001D7 1341 P:0001D9 567000 move a,x:M_STXH ;send high byte FFFF97 1342 P:0001DB 0140C6 and #$00ffff,a 00FFFF 1343 P:0001DD 0140C5 cmp #$0000ff,a 0000FF 1344 P:0001DF 0597D2 blt prbegin 1345 P:0001E0 019381 jclr #1,x:M_SSR,* ;wait for tx to finish 0001E0 1346 P:0001E2 019380 jclr #0,x:M_SSR,* ;wait for tx to finish 0001E2 1347 P:0001E4 567000 move a,x:M_STXM ;send mid byte FFFF96 1348 P:0001E6 0140C6 and #$0000ff,a 0000FF 1349 P:0001E8 014085 cmp #$000000,a 1350 P:0001E9 0597C8 blt prbegin 1351 P:0001EA 019381 jclr #1,x:M_SSR,* ;wait for tx to finish 0001EA 1352 P:0001EC 019380 jclr #0,x:M_SSR,* ;wait for tx to finish 0001EC 1353 P:0001EE 567000 move a,x:M_STXL ;send low byte FFFF95 1354 P:0001F0 050FC1 bra prbegin 1355 1356 ; Next 2 lines used in Cogdell mode (D4) 1357 P:0001F1 5EF000 move y:backa,a 000023 1358 P:0001F3 5FF000 move y:backb,b 000024 1359 1360 P:0001F5 00000C prend rts 1361 1362 1363 ; the SCI interrupt is triggered when a character is received 1364 ; this function takes the character, checks to make sure it is 1365 ; in the correct range (1-9, A-G, a-g) prints a message and 1366 ; modifies the output mask for that number of bits 1367 P:0001F6 21C600 ISCIRD move a,y0 ;back up A 1368 P:0001F7 56F000 move x:M_SRXL,a Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 8 FFFF98 1369 1370 P:0001F9 016185 cmp #'!',a 1371 P:0001FA 0D104A beq iscd1 0000DF 1372 P:0001FC 0140C5 cmp #'@',a 000040 1373 P:0001FE 0D104A beq iscd2 0000E3 1374 P:000200 016385 cmp #'#',a 1375 P:000201 0D104A beq iscd3 0000E8 1376 P:000203 016485 cmp #'$',a 1377 P:000204 0D104A beq iscd4 0000ED 1378 P:000206 016585 cmp #'%',a 1379 P:000207 0D104A beq iscd5 0000F2 1380 P:000209 0140C5 cmp #'^',a 00005E 1381 P:00020B 0D104A beq iscd6 0000F6 1382 P:00020D 016685 cmp #'&',a 1383 P:00020E 0D104A beq iscd7 0000FB 1384 P:000210 016A85 cmp #'*',a 1385 P:000211 0D104A beq iscd8 000100 1386 P:000213 016885 cmp #'(',a 1387 P:000214 0D104A beq iscd9 000105 1388 P:000216 0140C5 cmp #'A',a 000041 1389 P:000218 0D104A beq iscda 000109 1390 P:00021A 0140C5 cmp #'B',a 000042 1391 P:00021C 0D104A beq iscdb 00010D 1392 P:00021E 0140C5 cmp #'C',a 000043 1393 P:000220 0D104A beq iscdc 000111 1394 P:000222 0140C5 cmp #'D',a 000044 1395 P:000224 0D104A beq iscdd 000115 1396 1397 P:000226 017185 cmp #$31,a ; >='1' 1398 P:000227 0D1049 blt iscend 000121 1399 P:000229 017A85 cmp #$3A,a ; <='9' 1400 P:00022A 0D1049 blt iscnum 000015 1401 1402 P:00022C 0140C5 cmp #'M',a ; =='M' ;change mode Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 9 00004D 1403 P:00022E 0D104A beq iscmode 00003C 1404 P:000230 0140C5 cmp #'m',a ; =='m' 00006D 1405 P:000232 0D104A beq iscmode 000038 1406 1407 ; cmp #$40,a ; >='A' 1408 ; blt iscend 1409 ; cmp #$48,a ; <='G' 1410 ; blt isclet 1411 P:000234 0140C5 cmp #$60,a ; >='a' 000060 1412 P:000236 0D1049 blt iscend 000112 1413 P:000238 0140C5 cmp #$67,a ; <='g' 000067 1414 P:00023A 0D1047 bgt iscend 00010E 1415 P:00023C 016084 sub #$20,a 1416 P:00023D 0D10C0 bra isclet 000003 1417 1418 P:00023F 014780 iscnum add #$07,a 1419 P:000240 014980 isclet add #$09,a 1420 1421 P:000241 019381 isciup jclr #1,x:M_SSR,* ;wait for tx to finish 000241 1422 P:000243 019380 jclr #0,x:M_SSR,* ;wait for tx to finish 000243 1423 P:000245 07F415 movep #$0d,x:M_STXL ;print LF 00000D 1424 P:000247 2F8000 move #$800000,b ;initial mask 1425 P:000248 5E7000 move a,y:temp ;hold onto value temporarially 00001E 1426 P:00024A 0140C4 sub #$41,a ;amount to shift mask 000041 1427 P:00024C 000000 nop ;can't avoid, 'sub' is slow 1428 P:00024D 5E7000 move a,y:masksz 00001D 1429 P:00024F 21C400 move a,x0 1430 P:000250 0C1E79 asr x0,b,b ;shift the mask 1431 P:000251 56F400 move #>$00000f,a ;calculate bit shift 00000F 1432 P:000253 200044 sub x0,a 1433 P:000254 0C1E35 lsr a1,b 1434 P:000255 2B0000 move #<$00,b2 1435 P:000256 5EF000 move y:temp,a 00001E 1436 P:000258 5F7000 move b,y:diff 00001C 1437 P:00025A 015084 sub #$10,a 1438 P:00025B 017A85 cmp #$3A,a ;is a 10 digit? 1439 P:00025C 0D1049 blt isci0 000005 Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 10 1440 1441 P:00025E 014A84 isci1 sub #$0a,a 1442 P:00025F 0140C2 or #$001100,a ;add 10's digit if necessary 001100 1443 1444 P:000261 0140C0 isci0 add #$202000,a 202000 1445 ; nop 1446 P:000263 65F400 move #modech,r5 ;do move here instead of 'nop' 00016E 1447 P:000265 5E7000 move a,y:bits 00016F 1448 ; move #modech,r5 1449 P:000267 0D01CD jsr print 1450 P:000268 0D10C0 bra iscend 0000E0 1451 1452 P:00026A 5EF000 iscmode move y:modech,a ;change modes 00016E 1453 P:00026C 0140C5 cmp #$44302d,a ;check if D0 mode 44302D 1454 P:00026E 0D104A beq iscmd1 000021 1455 P:000270 0140C5 cmp #$44312d,a ;check if D1 mode 44312D 1456 P:000272 0D104A beq iscmd2 00002A 1457 P:000274 0140C5 cmp #$44322d,a ;check if D2 mode 44322D 1458 P:000276 0D104A beq iscmd3 000033 1459 P:000278 0140C5 cmp #$44332d,a ;check if D3 mode 44332D 1460 P:00027A 0D104A beq iscmd4 00003C 1461 P:00027C 0140C5 cmp #$44342d,a ;check if D4 mode 44342D 1462 P:00027E 0D104A beq iscms 000045 1463 P:000280 0D10C0 bra iscmd0 ;must be S mode 000002 1464 1465 P:000282 56F400 iscmd0 move #$44302d,a ;change from S to D0 mode 44302D 1466 ; nop 1467 P:000284 57F400 move #>coef0,b ;do move here instead of 'nop' 000178 1468 P:000286 5E7000 move a,y:modech 00016E 1469 P:000288 2E0100 move #1,a 1470 ; move #>coef0,b 1471 P:000289 5F7000 move b,y:coefloc 000177 1472 P:00028B 5E7000 move a,y:mode 000026 1473 P:00028D 0D10C0 bra iscmend Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 11 000041 1474 1475 P:00028F 56F400 iscmd1 move #$44312d,a ;change from D0 to D1 mode 44312D 1476 ; nop 1477 P:000291 57F400 move #>coef1,b ;do move here instead of 'nop' 000180 1478 P:000293 5E7000 move a,y:modech 00016E 1479 P:000295 2E0100 move #1,a 1480 ; move #>coef1,b 1481 P:000296 5F7000 move b,y:coefloc 000177 1482 P:000298 5E7000 move a,y:mode 000026 1483 P:00029A 0D10C0 bra iscmend 000034 1484 1485 P:00029C 56F400 iscmd2 move #$44322d,a ;change from D1 to D2 mode 44322D 1486 ; nop 1487 P:00029E 57F400 move #>coef2,b ;do move here instead of 'nop' 000188 1488 P:0002A0 5E7000 move a,y:modech 00016E 1489 P:0002A2 2E0100 move #1,a 1490 ; move #>coef2,b 1491 P:0002A3 5F7000 move b,y:coefloc 000177 1492 P:0002A5 5E7000 move a,y:mode 000026 1493 P:0002A7 0D10C0 bra iscmend 000027 1494 1495 P:0002A9 56F400 iscmd3 move #$44332d,a ;change from D2 to D3 mode 44332D 1496 ; nop 1497 P:0002AB 57F400 move #>coef3,b ;do move here instead of 'nop' 000190 1498 P:0002AD 5E7000 move a,y:modech 00016E 1499 P:0002AF 2E0100 move #1,a 1500 ; move #>coef3,b 1501 P:0002B0 5F7000 move b,y:coefloc 000177 1502 P:0002B2 5E7000 move a,y:mode 000026 1503 P:0002B4 0D10C0 bra iscmend 00001A 1504 1505 ; Add new mode, D4, here to use arbitrary user thresholds for 1506 ; A, B< C, & D parameters 1507 P:0002B6 56F400 iscmd4 move #$44342d,a ;change from D3 to D4 mode 44342D 1508 ; nop 1509 P:0002B8 57F400 move #>coef4,b ;do move here instead of 'nop' Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 12 000198 1510 P:0002BA 5E7000 move a,y:modech 00016E 1511 P:0002BC 2E0100 move #1,a 1512 ; move #>coef4,b 1513 P:0002BD 5F7000 move b,y:coefloc 000177 1514 P:0002BF 5E7000 move a,y:mode 000026 1515 P:0002C1 0D10C0 bra iscmend 00000D 1516 1517 P:0002C3 56F400 iscms move #$53202d,a ;change from D3 to S mode 53202D 1518 P:0002C5 000000 nop 1519 P:0002C6 5E7000 move a,y:modech 00016E 1520 P:0002C8 2E0000 move #0,a 1521 P:0002C9 000000 nop 1522 P:0002CA 5E7000 move a,y:mode 000026 1523 P:0002CC 0D10C0 bra iscmend 000002 1524 P:0002CE 019381 iscmend jclr #1,x:M_SSR,* ;wait for tx to finish 0002CE 1525 P:0002D0 019380 jclr #0,x:M_SSR,* ;wait for tx to finish 0002D0 1526 P:0002D2 07F415 movep #$0d,x:M_STXL ;print LF 00000D 1527 P:0002D4 65F400 move #modech,r5 00016E 1528 P:0002D6 0D01CD jsr print 1529 P:0002D7 0D10C0 bra iscend 000071 1530 1531 P:0002D9 5EF000 iscd1 move y:d1,a 000002 1532 P:0002DB 5E7000 move a,y:div 000172 1533 P:0002DD 56F400 move #>$1,a 000001 1534 P:0002DF 0D10C0 bra isccend 000062 1535 1536 P:0002E1 5EF000 iscd2 move y:d2,a 000004 1537 P:0002E3 5E7000 move a,y:div 000172 1538 P:0002E5 56F400 move #>$2,a 000002 1539 P:0002E7 0D10C0 bra isccend 00005A 1540 1541 P:0002E9 5EF000 iscd3 move y:d3,a 000006 1542 P:0002EB 5E7000 move a,y:div Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 13 000172 1543 P:0002ED 56F400 move #>$3,a 000003 1544 P:0002EF 0D10C0 bra isccend 000052 1545 1546 P:0002F1 5EF000 iscd4 move y:d4,a 000008 1547 P:0002F3 5E7000 move a,y:div 000172 1548 P:0002F5 56F400 move #>$4,a 000004 1549 P:0002F7 0D10C0 bra isccend 00004A 1550 1551 P:0002F9 5EF000 iscd5 move y:d5,a 00000A 1552 P:0002FB 5E7000 move a,y:div 000172 1553 P:0002FD 56F400 move #>$5,a 000005 1554 P:0002FF 0D10C0 bra isccend 000042 1555 1556 P:000301 5EF000 iscd6 move y:d6,a 00000C 1557 P:000303 5E7000 move a,y:div 000172 1558 P:000305 56F400 move #>$6,a 000006 1559 P:000307 0D10C0 bra isccend 00003A 1560 1561 P:000309 5EF000 iscd7 move y:d7,a 00000E 1562 P:00030B 5E7000 move a,y:div 000172 1563 P:00030D 56F400 move #>$7,a 000007 1564 P:00030F 0D10C0 bra isccend 000032 1565 1566 P:000311 5EF000 iscd8 move y:d8,a 000010 1567 P:000313 5E7000 move a,y:div 000172 1568 P:000315 56F400 move #>$8,a 000008 1569 P:000317 0D10C0 bra isccend 00002A 1570 1571 P:000319 5EF000 iscd9 move y:d9,a 000012 1572 P:00031B 5E7000 move a,y:div 000172 1573 P:00031D 56F400 move #>$9,a Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 14 000009 1574 P:00031F 0D10C0 bra isccend 000022 1575 1576 P:000321 5EF000 iscda move y:d10,a 000014 1577 P:000323 5E7000 move a,y:div 000172 1578 P:000325 56F400 move #>$a,a 00000A 1579 P:000327 0D10C0 bra isccend 00001A 1580 1581 P:000329 5EF000 iscdb move y:d16,a 000016 1582 P:00032B 5E7000 move a,y:div 000172 1583 P:00032D 56F400 move #>$10,a 000010 1584 P:00032F 0D10C0 bra isccend 000012 1585 1586 P:000331 5EF000 iscdc move y:d24,a 000018 1587 P:000333 5E7000 move a,y:div 000172 1588 P:000335 56F400 move #>$18,a 000018 1589 P:000337 0D10C0 bra isccend 00000A 1590 1591 P:000339 5EF000 iscdd move y:d32,a 00001A 1592 P:00033B 5E7000 move a,y:div 000172 1593 P:00033D 56F400 move #>$20,a 000020 1594 P:00033F 0D10C0 bra isccend 000002 1595 1596 1597 P:000341 5E7000 isccend move a,y:divider 000000 1598 P:000343 65F400 move #modech,r5 00016E 1599 P:000345 0D01CD jsr print 1600 P:000346 0D10C0 bra iscend 000002 1601 1602 P:000348 20CE00 iscend move y0,a ;restore A 1603 P:000349 000004 rti 1604 1605 1606 include 'ada_init.asm' 1607 page 132,60 1608 ;************************************************************************** Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 ada_init.asm Page 15 1609 ; ADA_INIT.ASM Ver 1.2 1610 ; Example program to initialize the CS4218 1611 ; 1612 ; Copyright (c) MOTOROLA 1995, 1996, 1997, 1998 1613 ; Semiconductor Products Sector 1614 ; Wireless Signal Processing Division 1615 ; 1616 ; History: 1617 ; 14 June 1996: RLR/LJD - ver 1.0 1618 ; 21 July 1997: BEA - ver 1.1 1619 ; 23 Sept 1998: TTL - ver 1.2 1620 ;************************************************************************** 1621 X:00000A org x: 1622 1623 ; Codec control constants 1624 X:00000A CTRL_WD_HI ds 1 1625 X:00000B CTRL_WD_LO ds 1 1626 1627 1628 ; GPIO pin constants 1629 1630 ; ESSI0 - audio data GPIO mode 1631 ; DSP CODEC 1632 ; --------------------------- 1633 CODEC_RESET 1634 000000 equ 0 ; bit0 SC00 ---> CODEC_RESET~ 1635 1636 ; ESSI1 - control data GPIO Mode 1637 ; DSP CODEC 1638 ;---------------------------- 1639 000000 CCS equ 0 ; bit0 SC10 ---> CCS~ 1640 000001 CCLK equ 1 ; bit1 SC11 ---> CCLK 1641 000002 CDIN equ 2 ; bit2 SC12 ---> CDIN 1642 1643 ;************************************************************************** 1644 ; Initialize the CS4218 codec 1645 ; --------------------------- 1646 ; Serial Mode 4 (SM4), DSP Slave/Codec Master, 32-bits per frame 1647 ; 1648 ; After a reset, the control port must be written once to initialize it 1649 ; if the port will be accessed to read or write control bits. The initial 1650 ; write is a "dummy" write since the data is ignored by the codec. A second 1651 ; write is needed to configure the codec as desired. Then, the control port 1652 ; only needs to be written to when a change is desired, or to obtain status 1653 ; information. 1654 ; 1655 ; Although only 23 bits contain useful data in CDIN, a minimum of 31 bits 1656 ; must be written. 1657 ; 1658 ; CDIN 1659 ;------------------------------------------------ 1660 ; bit 31 0 1661 ;------------------------------------------------ 1662 ; bit 30 mask interrupt 1663 ; 0=no mask on MF5:\INT pin 1664 ; 1=mask on MF5:\INT pin Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 ada_init.asm Page 16 1665 ;------------------------------------------------ 1666 ; bit 29 DO1 1667 ;------------------------------------------------ 1668 ; bits 28-24 left output D/A sttenuation (1.5dB steps) 1669 ; 00000=No attenuation 0dB 1670 ; 11111=Max attenuation -46.5dB 1671 ;------------------------------------------------ 1672 ; bits 23-19 right output D/A attenuation (1.5dB steps) 1673 ; 00000=No attenuation 0dB 1674 ; 11111=Max attenuation -46.5dB 1675 ;------------------------------------------------ 1676 ; bit 18 mute D/A outputs 1677 ; 0=outputs ON 1678 ; 1=outputs MUTED 1679 ;------------------------------------------------ 1680 ; bit 17 input mux, left select 1681 ; 0=RIN1 1682 ; 1=RIN2 (used on EVM) 1683 ;------------------------------------------------ 1684 ; bit 16 input mux, right select 1685 ; 0=LIN1 1686 ; 1=LIN2 (used on EVM) 1687 ;------------------------------------------------ 1688 ; bits 15-12 left input A/D gain (1.5dB steps) 1689 ; 0000=No gain 0dB 1690 ; 1111=Max gain +22.5dB 1691 ;------------------------------------------------ 1692 ; bits 11-8 right input A/D gain (1.5dB steps) 1693 ; 0000=No gain 0dB 1694 ; 1111=Max gain +22.5dB 1695 ;------------------------------------------------ 1696 ; bits 7-0 00000000 1697 ;------------------------------------------------ 1698 ;************************************************************************** 1699 1700 1701 P:00034A org p: 1702 ada_init 1703 1704 ; reset ESSI ports 1705 P:00034A 07F43F movep #$0000,x:M_PCRC ; reset ESSI0 port 000000 1706 P:00034C 07F42F movep #$0000,x:M_PCRD ; reset ESSI1 port 000000 1707 1708 ; Set Control Register A and B 1709 P:00034E 07F435 movep #$101807,x:M_CRA0 ; 12.288MHz/16 = 768KHz SCLK 101807 1710 ; prescale modulus = 8 1711 ; frame rate divider = 2 1712 ; 16-bits per word 1713 ; 32-bits per frame 1714 ; 16-bit data aligned to bit 23 1715 1716 P:000350 07F436 movep #$ff330c,x:M_CRB0 ; Enable REIE,TEIE,RLIE,TLIE, FF330C Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 ada_init.asm Page 17 1717 ; RIE,TIE,RE,TE0 1718 ; network mode, synchronous, 1719 ; out on rising/in on falling 1720 ; shift MSB first 1721 ; external clock source drives SCK 1722 ; (codec is master) 1723 ; RX frame sync pulses active for 1724 ; 1 bit clock immediately before 1725 ; transfer period 1726 ; positive frame sync polarity 1727 ; frame sync length is 1-bit 1728 1729 ; Configure GPIO pins -- (functionality and direction ) 1730 P:000352 07F43F movep #$0000,x:M_PCRC ; Enable GPIO pin 0 SC00=CODEC_RESET 000000 1731 P:000354 07F42F movep #$0000,x:M_PCRD ; Enable GPIO CSS (pin 0),CCLK (pin 1), CDIN (pin 2) 000000 1732 1733 P:000356 07F43E movep #$0001,x:M_PRRC ; set PC0=CODEC_RESET~ as output 000001 1734 P:000358 07F42E movep #$0007,x:M_PRRD ; set PD0=CCS~ as output 000007 1735 ; set PD1=CCLK as output 1736 ; set PD2=CDIN as output 1737 1738 ; Codec Reset 1739 P:00035A 013D00 bclr #CODEC_RESET,x:M_PDRC ; assert CODEC_RESET~ 1740 P:00035B 012D00 bclr #CCS,x:M_PDRD ; assert CCS~ -- allows control register to be writte n to 1741 1742 ; Delay to allow Codec to reset 1743 P:00035C 06E883 do #1000,_delay_loop 00035F 1744 P:00035E 06E8A3 rep #1000 ; minimum 50 ms delay 1745 P:00035F 000000 nop 1746 _delay_loop 1747 1748 1749 ; Setting up to send Codec control information 1750 P:000360 013D20 bset #CODEC_RESET,x:M_PDRC ; deassert CODEC_RESET~ 1751 1752 1753 ; Sending control words 1754 set_control 1755 P:000361 44F400 move #CTRL_WD_12,x0 ; transfer control value to control variable 000300 1756 P:000363 440A00 move x0,x:CTRL_WD_HI 1757 P:000364 245500 move #CTRL_WD_34,x0 1758 P:000365 440B00 move x0,x:CTRL_WD_LO 1759 P:000366 0BF080 jsr codec_control ; send in dummy control information 000370 1760 P:000368 0BF080 jsr codec_control ; send in correct control information 000370 1761 1762 Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 ada_init.asm Page 18 1763 ; Set and enable interrupts 1764 P:00036A 08F4BE movep #$000c,x:M_IPRP ; set interrupt priority level for ESSI0 to 3 00000C 1765 P:00036C 00FCB8 andi #$fc,mr ; enable interrupts 1766 1767 ; Set ESSI functionality 1768 P:00036D 07F43F movep #$003e,x:M_PCRC ; enable ESSI0 except SC00=CODEC_RESET 00003E 1769 1770 P:00036F 00000C rts 1771 1772 1773 ;------------------------------------------------------------- 1774 ; codec_control routine 1775 ; Input: CTRL_WD_LO and CTRL_WD_HI 1776 ; Output: CDIN 1777 ; Description: Used to send control information to CODEC 1778 ; NOTE: does not preserve the 'a' register. 1779 ;------------------------------------------------------------- 1780 codec_control 1781 P:000370 200013 clr a 1782 P:000371 012D00 bclr #CCS,x:M_PDRD ; assert CCS 1783 P:000372 548A00 move x:CTRL_WD_HI,a1 ; upper 16 bits of control data 1784 P:000373 0BF080 jsr send_codec ; shift out upper control word 00037A 1785 P:000375 548B00 move x:CTRL_WD_LO,a1 ; lower 16 bits of control data 1786 P:000376 0BF080 jsr send_codec ; shift out lower control word 00037A 1787 P:000378 012D20 bset #CCS,x:M_PDRD ; deassert CCS 1788 P:000379 00000C rts 1789 1790 1791 ;--------------------------------------------------------------- 1792 ; send_codec routine 1793 ; Input: a1 containing control information 1794 ; Output: sends bits to CDIN 1795 ; Description: Determines bits to send to CDIN 1796 ;--------------------------------------------------------------- 1797 1798 send_codec 1799 P:00037A 061080 do #16,end_send_codec ; 16 bits per word 000386 1800 P:00037C 012D21 bset #CCLK,x:M_PDRD ; toggle CCLK clock high 1801 P:00037D 0ACC17 jclr #23,a1,bit_low ; test msb 000382 1802 P:00037F 012D22 bset #CDIN,x:M_PDRD ; send high into CDIN 1803 P:000380 0AF080 jmp continue 000383 1804 bit_low 1805 P:000382 012D02 bclr #CDIN,x:M_PDRD ; send low into CDIN 1806 continue 1807 P:000383 0602A0 rep #2 ; delay 1808 P:000384 000000 nop 1809 P:000385 012D01 bclr #CCLK,x:M_PDRD ; restart cycle 1810 P:000386 200033 lsl a ; shift control word to 1 bit 1811 ; to left Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 ada_init.asm Page 19 1812 end_send_codec 1813 P:000387 00000C rts 1814 1815 1816 1817 1818 ;**************************************************************************** 1819 ; SSI0_ISR.ASM Ver.2.0 1820 ; Example program to handle interrupts through 1821 ; the 56307 SSI0 to move audio through the CS4218 1822 ; 1823 ; Copyright (c) MOTOROLA 1995, 1996, 1997, 1998 1824 ; Semiconductor Products Sector 1825 ; Digital Signal Processing Division 1826 ; 1827 ; 1828 ; History: 1829 ; 14 June 1996: RLR/LJD - ver 1.0 1830 ; 23 July 1997: BEA - ver 1.1 1831 ;****************************************************************************** 1832 1833 1834 ;----the actual interrupt service routines (ISRs) follow: 1835 1836 ;************************ SSI TRANSMIT ISR ********************************* 1837 ssi_txe_isr 1838 P:000388 013704 bclr #4,x:M_SSISR0 ; Read SSISR to clear exception flag 1839 ; explicitly clears underrun flag 1840 ssi_tx_isr 1841 P:000389 605F00 move r0,x:(r7)+ ; Save r0 to the stack. 1842 P:00038A 055F20 move m0,x:(r7)+ ; Save m0 to the stack. 1843 P:00038B 0501A0 move #1,m0 ; Modulus 2 buffer. 1844 P:00038C 608900 move x:TX_PTR,r0 ; Load the pointer to the tx buffer. 1845 P:00038D 000000 nop 1846 P:00038E 000000 nop 1847 P:00038F 000000 nop 1848 P:000390 07D83C movep x:(r0)+,x:M_TX00 ; SSI transfer data register. 1849 P:000391 600900 move r0,x:TX_PTR ; Update tx buffer pointer. 1850 P:000392 05FF20 move x:-(r7),m0 ; Restore m0. 1851 P:000393 60FF00 move x:-(r7),r0 ; Restore r0. 1852 P:000394 000004 rti 1853 1854 ;********************* SSI TRANSMIT LAST SLOT ISR ************************** 1855 ssi_txls_isr 1856 P:000395 605F00 move r0,x:(r7)+ ; Save r0 to the stack. 1857 P:000396 300400 move #TX_BUFF_BASE,r0 ; Reset pointer. 1858 P:000397 000000 nop 1859 P:000398 600900 move r0,x:TX_PTR ; Reset tx buffer pointer just in 1860 P:000399 000000 nop ; case it was corrupted. 1861 P:00039A 60FF00 move x:-(r7),r0 ; Restore r0. 1862 P:00039B 000004 rti 1863 1864 ;************************** SSI receive ISR ******************************** 1865 ssi_rxe_isr 1866 P:00039C 013705 bclr #5,x:M_SSISR0 ; Read SSISR to clear exception flag 1867 ; explicitly clears overrun flag Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 ada_init.asm Page 20 1868 ssi_rx_isr 1869 P:00039D 605F00 move r0,x:(r7)+ ; Save r0 to the stack. 1870 P:00039E 055F20 move m0,x:(r7)+ ; Save m0 to the stack. 1871 P:00039F 0501A0 move #1,m0 ; Modulus 2 buffer. 1872 P:0003A0 608800 move x:RX_PTR,r0 ; Load the pointer to the rx buffer. 1873 P:0003A1 000000 nop 1874 P:0003A2 000000 nop 1875 P:0003A3 000000 nop 1876 P:0003A4 075838 movep x:M_RX0,x:(r0)+ ; Read out received data to buffer. 1877 P:0003A5 600800 move r0,x:RX_PTR ; Update rx buffer pointer. 1878 P:0003A6 05FF20 move x:-(r7),m0 ; Restore m0. 1879 P:0003A7 60FF00 move x:-(r7),r0 ; Restore r0. 1880 P:0003A8 000004 rti 1881 1882 ;********************** SSI receive last slot ISR ************************** 1883 ssi_rxls_isr 1884 P:0003A9 605F00 move r0,x:(r7)+ ; Save r0 to the stack. 1885 P:0003AA 300000 move #RX_BUFF_BASE,r0 ; Reset rx buffer pointer just in 1886 ; case it was corrupted. 1887 P:0003AB 600800 move r0,x:RX_PTR ; Update rx buffer pointer. 1888 P:0003AC 60FF00 move x:-(r7),r0 ; Restore r0. 1889 P:0003AD 000004 rti 1890 1891 1892 Y:000000 org y: 1893 Y:000000 divider dc $1 1894 Y:000001 count dc $0 1895 ;doffset dc $0 1896 1897 ;d dc d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d16,d24,d32 1898 Y:000002 d1 dc "1 ",$0 ; 48 1899 Y:000004 d2 dc "2 ",$0 ; 24 1900 Y:000006 d3 dc "3 ",$0 ; 16 1901 Y:000008 d4 dc "4 ",$0 ; 12 1902 Y:00000A d5 dc "5 ",$0 ; 9.6 1903 Y:00000C d6 dc "6 ",$0 ; 8 1904 Y:00000E d7 dc "7 ",$0 ; 6.857 1905 Y:000010 d8 dc "8 ",$0 ; 6 1906 Y:000012 d9 dc "9 ",$0 ; 5.333 1907 Y:000014 d10 dc "10 ",$0 ; 4.8 1908 Y:000016 d16 dc "16 ",$0 ; 3 1909 Y:000018 d24 dc "24 ",$0 ; 2 1910 Y:00001A d32 dc "32 ",$0 ; 1.5 1911 1912 Y:00001C diff dc $007f00 1913 Y:00001D masksz dc $07 1914 Y:00001E temp dc $0 1915 Y:00001F olda dc $0 1916 Y:000020 oldb dc $0 1917 Y:000021 newa dc $0 1918 Y:000022 newb dc $0 1919 Y:000023 backa dc $0 1920 Y:000024 backb dc $0 1921 Y:000025 mask dc $00ffff 1922 Y:000026 mode dc $0 ;0=sampling 1=delta 1923 Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 21 1924 ; To be used for inputting 2 level delta modulator with deadband A, B, C, & D 1925 Y:000027 inproc dc $0a0d00 1926 Y:000028 dc "proc" 1927 Y:00002A dc $0d0000,$0 1928 Y:00002C indelta dc $0a0d00 1929 Y:00002D dc "delta" 1930 Y:00002F dc $0d0000,$0 1931 Y:000031 insmala dc $0a0d00 1932 Y:000032 dc "smalla" 1933 Y:000034 dc $0d0000,$0 1934 Y:000036 inposa dc $0a0d00 1935 Y:000037 dc "posa" 1936 Y:000039 dc $0d0000,$0 1937 Y:00003B ingooda dc $0a0d00 1938 Y:00003C dc "gooda" 1939 Y:00003E dc $0d0000,$0 1940 Y:000040 insmalb dc $0a0d00 1941 Y:000041 dc "smallb" 1942 Y:000043 dc $0d0000,$0 1943 Y:000045 inposb dc $0a0d00 1944 Y:000046 dc "posb" 1945 Y:000048 dc $0d0000,$0 1946 Y:00004A ingoodb dc $0a0d00 1947 Y:00004B dc "goodb" 1948 Y:00004D dc $0d0000,$0 1949 1950 Y:00004F greet dc $0a0d00 1951 Y:000050 dc "This program demonstrates 16-bit audio sampling on the Motorola" 1952 Y:000065 dc $0a0d00 1953 Y:000066 dc "DSP56303 with delta modulating and bit sampling using 1-16 bits." 1954 Y:00007C dc $0a0d00 1955 Y:00007D dc $0a0d00 1956 Y:00007E dc "Bit sampling takes the high order n bits of the input sample and" 1957 Y:000094 dc $0a0d00 1958 Y:000095 dc "constructs the output from only those bits to give varied resolutions" 1959 Y:0000AC dc $0a0d00 1960 Y:0000AD dc "Delta Modulation uses one of four different modulation techniques. The" 1961 Y:0000C5 dc $0a0d00 1962 Y:0000C6 dc "maximum stepsize is varied from 2^0 to 2^15 to give different resolutions." 1963 Y:0000DF dc $0a0d00 1964 Y:0000E0 dc $0a0d00 1965 Y:0000E1 dc "Attach the audio input to the Line-In jack and speakers/headphones" 1966 Y:0000F7 dc $0a0d00 1967 Y:0000F8 dc "to the Headphone-Out jack. " 1968 Y:000102 dc $0a0d00 1969 Y:000103 dc $0a0d00 1970 Y:000104 dc "Type 1-9 or A-G to change the bit resolution/delta step size." 1971 Y:000119 dc $0a0d00 1972 Y:00011A dc " 1=1 bit, G=16 bit or step size = (0.0397 mV)(2^n). " 1973 Y:00012D dc $0a0d00 1974 Y:00012E dc "Type M to change between Sampled (S) and 5 Delta (Dx) modes." 1975 Y:000142 dc $0a0d00 1976 Y:000143 dc "Type + 1-9 or A-D to change the sampling rate, 48/n kHz." 1977 Y:000159 dc $0a0d00,$0a0d00 1978 Y:00015B dc "Mode - Resolution(bits)|Step Size - Frequency (kHz):" 1979 Y:00016D dc $0a0d00 Motorola DSP56300 Assembler Version 6.3.0 102-10-30 12:15:53 VOICEDLT.ASM Page 22 1980 Y:00016E modech dc $53202d ; ="S -" 1981 Y:00016F bits dc $202038 ; =" 8" 1982 Y:000170 hz dc " - 48/" 1983 Y:000172 div dc "1 " 1984 Y:000173 dc $0d0000,$0 1985 Y:000175 crlf dc $0a0d00,$0 1986 Y:000177 coefloc dc coef3 ;location of coefficients 1987 Y:000178 coef0 dc 7,7,7,7,7,7,7,7 ;used for delta modulation D0 1988 Y:000180 coef1 dc 0,0,0,0,7,7,7,7 ;used for delta modulation D1 1989 Y:000188 coef2 dc 0,0,2,2,2,7,7,7 ;used for delta modulation D2 1990 Y:000190 coef3 dc 0,0,2,2,4,4,7,7 ;used for delta modulation D3 1991 Y:000198 coef4 dc 0,1,2,3,4,5,6,7 ;used for delta modulation D4 1992 1993 end 0 Errors 0 Warnings