diff --git a/soft/PjtKEIL_StepDFT/Src/DFT.s b/soft/PjtKEIL_StepDFT/Src/DFT.s index 87a19f2..094e1bf 100644 --- a/soft/PjtKEIL_StepDFT/Src/DFT.s +++ b/soft/PjtKEIL_StepDFT/Src/DFT.s @@ -38,28 +38,30 @@ Boucle and r6, r6, #63 ; kn & 000000000011111 ldrsh r7,[r4, r6, LSL #1] ; TabCos[kn] ; là format 1.15 mul r10, r3, r7 ; x[n]*TabCos[n] 5.27 - asr r10, r10, #4 ; 5.23 - asr r0, r0, #4 ; 5.23 + asr r10, r10, #1 ; 5.26 + ;asr r0, r0, #1 ; 6.26 ;mla r0, r7, r3, r0 ; x(k) += x[n]*TabCos[n] ;11.27 add r0, r0, r10 ; 6.24 ; r0 contient la valeur de la somme des Cos ldrsh r7,[r9, r6, LSL #1] ; TabSin[kn] ; là format 1.15 mul r10, r3, r7 ; x[n]*TabSin[n] 5.27 - asr r10, r10, #4 ; 5.23 - asr r8, r8, #4 ; 5.23 - add r8, r8, r10 ; 6.24 ; r8 contient la valeur de la somme des Sin + asr r10, r10, #1 ; 5.26 + ;asr r8, r8, #4 ; 5.26 + add r8, r8, r10 ; 6.26 ; r8 contient la valeur de la somme des Sin add r5, #1 bl Boucle Fin - asr r0, r0, #16 ; 6.7 - asr r8, r8, #16 ; 6.7 - mul r0, r0, r0 ; 12.14 - mul r8, r8, r8 ; 12.14 + asr r0, r0, #16 ; 6.10 + asr r8, r8, #16 ; 6.10 + mul r0, r0, r0 ; 12.20 + mul r8, r8, r8 ; 12.20 + asr r0, r0, #1 ; 12.19 + asr r8, r8, #1 ; 12.19 - add r0, r0, r8 ; 13.14 + add r0, r0, r8 ; 13.19 pop{pc, r4, r5, r6, r7, r8, r9, r10} diff --git a/soft/PjtKEIL_StepDFT/Src/Signal2.asm b/soft/PjtKEIL_StepDFT/Src/Signal2.asm index 4db046b..31bb084 100644 --- a/soft/PjtKEIL_StepDFT/Src/Signal2.asm +++ b/soft/PjtKEIL_StepDFT/Src/Signal2.asm @@ -1,68 +1,68 @@ AREA Signal, DATA, READONLY export LeSignal2 LeSignal2 - DCW 0x0802 ; 0 2050 0.50049 - DCW 0x0801 ; 1 2049 0.50024 - DCW 0x07ff ; 2 2047 0.49976 - DCW 0x07ff ; 3 2047 0.49976 - DCW 0x07ff ; 4 2047 0.49976 - DCW 0x0800 ; 5 2048 0.50000 - DCW 0x0801 ; 6 2049 0.50024 - DCW 0x0801 ; 7 2049 0.50024 - DCW 0x0800 ; 8 2048 0.50000 - DCW 0x07ff ; 9 2047 0.49976 - DCW 0x07ff ; 10 2047 0.49976 - DCW 0x0800 ; 11 2048 0.50000 - DCW 0x0801 ; 12 2049 0.50024 - DCW 0x0801 ; 13 2049 0.50024 - DCW 0x0801 ; 14 2049 0.50024 - DCW 0x07ff ; 15 2047 0.49976 - DCW 0x07ff ; 16 2047 0.49976 - DCW 0x07ff ; 17 2047 0.49976 - DCW 0x0801 ; 18 2049 0.50024 - DCW 0x0801 ; 19 2049 0.50024 - DCW 0x0801 ; 20 2049 0.50024 - DCW 0x0800 ; 21 2048 0.50000 - DCW 0x07ff ; 22 2047 0.49976 - DCW 0x07ff ; 23 2047 0.49976 - DCW 0x0800 ; 24 2048 0.50000 - DCW 0x0801 ; 25 2049 0.50024 - DCW 0x0801 ; 26 2049 0.50024 - DCW 0x0800 ; 27 2048 0.50000 - DCW 0x07ff ; 28 2047 0.49976 - DCW 0x07ff ; 29 2047 0.49976 - DCW 0x07ff ; 30 2047 0.49976 - DCW 0x0801 ; 31 2049 0.50024 - DCW 0x0802 ; 32 2050 0.50049 - DCW 0x0801 ; 33 2049 0.50024 - DCW 0x07ff ; 34 2047 0.49976 - DCW 0x07ff ; 35 2047 0.49976 - DCW 0x07ff ; 36 2047 0.49976 - DCW 0x0800 ; 37 2048 0.50000 - DCW 0x0801 ; 38 2049 0.50024 - DCW 0x0801 ; 39 2049 0.50024 - DCW 0x0800 ; 40 2048 0.50000 - DCW 0x07ff ; 41 2047 0.49976 - DCW 0x07ff ; 42 2047 0.49976 - DCW 0x0800 ; 43 2048 0.50000 - DCW 0x0801 ; 44 2049 0.50024 - DCW 0x0801 ; 45 2049 0.50024 - DCW 0x0801 ; 46 2049 0.50024 - DCW 0x07ff ; 47 2047 0.49976 - DCW 0x07ff ; 48 2047 0.49976 - DCW 0x07ff ; 49 2047 0.49976 - DCW 0x0801 ; 50 2049 0.50024 - DCW 0x0801 ; 51 2049 0.50024 - DCW 0x0801 ; 52 2049 0.50024 - DCW 0x0800 ; 53 2048 0.50000 - DCW 0x07ff ; 54 2047 0.49976 - DCW 0x07ff ; 55 2047 0.49976 - DCW 0x0800 ; 56 2048 0.50000 - DCW 0x0801 ; 57 2049 0.50024 - DCW 0x0801 ; 58 2049 0.50024 - DCW 0x0800 ; 59 2048 0.50000 - DCW 0x07ff ; 60 2047 0.49976 - DCW 0x07ff ; 61 2047 0.49976 - DCW 0x07ff ; 62 2047 0.49976 - DCW 0x0801 ; 63 2049 0.50024 + DCW 0x0be8 ; 0 3048 0.74414 + DCW 0x0b72 ; 1 2930 0.71533 + DCW 0x0a2c ; 2 2604 0.63574 + DCW 0x0862 ; 3 2146 0.52393 + DCW 0x0681 ; 4 1665 0.40649 + DCW 0x04fb ; 5 1275 0.31128 + DCW 0x042b ; 6 1067 0.26050 + DCW 0x0443 ; 7 1091 0.26636 + DCW 0x053d ; 8 1341 0.32739 + DCW 0x06de ; 9 1758 0.42920 + DCW 0x08c3 ; 10 2243 0.54761 + DCW 0x0a7a ; 11 2682 0.65479 + DCW 0x0b9c ; 12 2972 0.72559 + DCW 0x0be3 ; 13 3043 0.74292 + DCW 0x0b3f ; 14 2879 0.70288 + DCW 0x09d7 ; 15 2519 0.61499 + DCW 0x0800 ; 16 2048 0.50000 + DCW 0x0629 ; 17 1577 0.38501 + DCW 0x04c1 ; 18 1217 0.29712 + DCW 0x041d ; 19 1053 0.25708 + DCW 0x0464 ; 20 1124 0.27441 + DCW 0x0586 ; 21 1414 0.34521 + DCW 0x073d ; 22 1853 0.45239 + DCW 0x0922 ; 23 2338 0.57080 + DCW 0x0ac3 ; 24 2755 0.67261 + DCW 0x0bbd ; 25 3005 0.73364 + DCW 0x0bd5 ; 26 3029 0.73950 + DCW 0x0b05 ; 27 2821 0.68872 + DCW 0x097f ; 28 2431 0.59351 + DCW 0x079e ; 29 1950 0.47607 + DCW 0x05d4 ; 30 1492 0.36426 + DCW 0x048e ; 31 1166 0.28467 + DCW 0x0418 ; 32 1048 0.25586 + DCW 0x048e ; 33 1166 0.28467 + DCW 0x05d4 ; 34 1492 0.36426 + DCW 0x079e ; 35 1950 0.47607 + DCW 0x097f ; 36 2431 0.59351 + DCW 0x0b05 ; 37 2821 0.68872 + DCW 0x0bd5 ; 38 3029 0.73950 + DCW 0x0bbd ; 39 3005 0.73364 + DCW 0x0ac3 ; 40 2755 0.67261 + DCW 0x0922 ; 41 2338 0.57080 + DCW 0x073d ; 42 1853 0.45239 + DCW 0x0586 ; 43 1414 0.34521 + DCW 0x0464 ; 44 1124 0.27441 + DCW 0x041d ; 45 1053 0.25708 + DCW 0x04c1 ; 46 1217 0.29712 + DCW 0x0629 ; 47 1577 0.38501 + DCW 0x0800 ; 48 2048 0.50000 + DCW 0x09d7 ; 49 2519 0.61499 + DCW 0x0b3f ; 50 2879 0.70288 + DCW 0x0be3 ; 51 3043 0.74292 + DCW 0x0b9c ; 52 2972 0.72559 + DCW 0x0a7a ; 53 2682 0.65479 + DCW 0x08c3 ; 54 2243 0.54761 + DCW 0x06de ; 55 1758 0.42920 + DCW 0x053d ; 56 1341 0.32739 + DCW 0x0443 ; 57 1091 0.26636 + DCW 0x042b ; 58 1067 0.26050 + DCW 0x04fb ; 59 1275 0.31128 + DCW 0x0681 ; 60 1665 0.40649 + DCW 0x0862 ; 61 2146 0.52393 + DCW 0x0a2c ; 62 2604 0.63574 + DCW 0x0b72 ; 63 2930 0.71533 END diff --git a/soft/Signal.m b/soft/Signal.m index 37a470e..2fc4c7e 100644 --- a/soft/Signal.m +++ b/soft/Signal.m @@ -6,7 +6,7 @@ Frel = input('Fr Ph0 = input('Phase a l''origine (en degrés) : '); Ph0 = Ph0 * pi / 180.0; % a present en radian -Ampl = 1.5; +Ampl = 1000; Offset = 2048; %% Création du fichier .asm diff --git a/soft/Signal2.asm b/soft/Signal2.asm index 4f5a6b5..968a037 100644 --- a/soft/Signal2.asm +++ b/soft/Signal2.asm @@ -1,68 +1,68 @@ AREA Signal, DATA, READONLY export LeSignal LeSignal - DCW 0x0802 ; 0 2050 0.50049 - DCW 0x0801 ; 1 2049 0.50024 - DCW 0x07ff ; 2 2047 0.49976 - DCW 0x07ff ; 3 2047 0.49976 - DCW 0x07ff ; 4 2047 0.49976 - DCW 0x0800 ; 5 2048 0.50000 - DCW 0x0801 ; 6 2049 0.50024 - DCW 0x0801 ; 7 2049 0.50024 - DCW 0x0800 ; 8 2048 0.50000 - DCW 0x07ff ; 9 2047 0.49976 - DCW 0x07ff ; 10 2047 0.49976 - DCW 0x0800 ; 11 2048 0.50000 - DCW 0x0801 ; 12 2049 0.50024 - DCW 0x0801 ; 13 2049 0.50024 - DCW 0x0801 ; 14 2049 0.50024 - DCW 0x07ff ; 15 2047 0.49976 - DCW 0x07ff ; 16 2047 0.49976 - DCW 0x07ff ; 17 2047 0.49976 - DCW 0x0801 ; 18 2049 0.50024 - DCW 0x0801 ; 19 2049 0.50024 - DCW 0x0801 ; 20 2049 0.50024 - DCW 0x0800 ; 21 2048 0.50000 - DCW 0x07ff ; 22 2047 0.49976 - DCW 0x07ff ; 23 2047 0.49976 - DCW 0x0800 ; 24 2048 0.50000 - DCW 0x0801 ; 25 2049 0.50024 - DCW 0x0801 ; 26 2049 0.50024 - DCW 0x0800 ; 27 2048 0.50000 - DCW 0x07ff ; 28 2047 0.49976 - DCW 0x07ff ; 29 2047 0.49976 - DCW 0x07ff ; 30 2047 0.49976 - DCW 0x0801 ; 31 2049 0.50024 - DCW 0x0802 ; 32 2050 0.50049 - DCW 0x0801 ; 33 2049 0.50024 - DCW 0x07ff ; 34 2047 0.49976 - DCW 0x07ff ; 35 2047 0.49976 - DCW 0x07ff ; 36 2047 0.49976 - DCW 0x0800 ; 37 2048 0.50000 - DCW 0x0801 ; 38 2049 0.50024 - DCW 0x0801 ; 39 2049 0.50024 - DCW 0x0800 ; 40 2048 0.50000 - DCW 0x07ff ; 41 2047 0.49976 - DCW 0x07ff ; 42 2047 0.49976 - DCW 0x0800 ; 43 2048 0.50000 - DCW 0x0801 ; 44 2049 0.50024 - DCW 0x0801 ; 45 2049 0.50024 - DCW 0x0801 ; 46 2049 0.50024 - DCW 0x07ff ; 47 2047 0.49976 - DCW 0x07ff ; 48 2047 0.49976 - DCW 0x07ff ; 49 2047 0.49976 - DCW 0x0801 ; 50 2049 0.50024 - DCW 0x0801 ; 51 2049 0.50024 - DCW 0x0801 ; 52 2049 0.50024 - DCW 0x0800 ; 53 2048 0.50000 - DCW 0x07ff ; 54 2047 0.49976 - DCW 0x07ff ; 55 2047 0.49976 - DCW 0x0800 ; 56 2048 0.50000 - DCW 0x0801 ; 57 2049 0.50024 - DCW 0x0801 ; 58 2049 0.50024 - DCW 0x0800 ; 59 2048 0.50000 - DCW 0x07ff ; 60 2047 0.49976 - DCW 0x07ff ; 61 2047 0.49976 - DCW 0x07ff ; 62 2047 0.49976 - DCW 0x0801 ; 63 2049 0.50024 + DCW 0x0be8 ; 0 3048 0.74414 + DCW 0x0b72 ; 1 2930 0.71533 + DCW 0x0a2c ; 2 2604 0.63574 + DCW 0x0862 ; 3 2146 0.52393 + DCW 0x0681 ; 4 1665 0.40649 + DCW 0x04fb ; 5 1275 0.31128 + DCW 0x042b ; 6 1067 0.26050 + DCW 0x0443 ; 7 1091 0.26636 + DCW 0x053d ; 8 1341 0.32739 + DCW 0x06de ; 9 1758 0.42920 + DCW 0x08c3 ; 10 2243 0.54761 + DCW 0x0a7a ; 11 2682 0.65479 + DCW 0x0b9c ; 12 2972 0.72559 + DCW 0x0be3 ; 13 3043 0.74292 + DCW 0x0b3f ; 14 2879 0.70288 + DCW 0x09d7 ; 15 2519 0.61499 + DCW 0x0800 ; 16 2048 0.50000 + DCW 0x0629 ; 17 1577 0.38501 + DCW 0x04c1 ; 18 1217 0.29712 + DCW 0x041d ; 19 1053 0.25708 + DCW 0x0464 ; 20 1124 0.27441 + DCW 0x0586 ; 21 1414 0.34521 + DCW 0x073d ; 22 1853 0.45239 + DCW 0x0922 ; 23 2338 0.57080 + DCW 0x0ac3 ; 24 2755 0.67261 + DCW 0x0bbd ; 25 3005 0.73364 + DCW 0x0bd5 ; 26 3029 0.73950 + DCW 0x0b05 ; 27 2821 0.68872 + DCW 0x097f ; 28 2431 0.59351 + DCW 0x079e ; 29 1950 0.47607 + DCW 0x05d4 ; 30 1492 0.36426 + DCW 0x048e ; 31 1166 0.28467 + DCW 0x0418 ; 32 1048 0.25586 + DCW 0x048e ; 33 1166 0.28467 + DCW 0x05d4 ; 34 1492 0.36426 + DCW 0x079e ; 35 1950 0.47607 + DCW 0x097f ; 36 2431 0.59351 + DCW 0x0b05 ; 37 2821 0.68872 + DCW 0x0bd5 ; 38 3029 0.73950 + DCW 0x0bbd ; 39 3005 0.73364 + DCW 0x0ac3 ; 40 2755 0.67261 + DCW 0x0922 ; 41 2338 0.57080 + DCW 0x073d ; 42 1853 0.45239 + DCW 0x0586 ; 43 1414 0.34521 + DCW 0x0464 ; 44 1124 0.27441 + DCW 0x041d ; 45 1053 0.25708 + DCW 0x04c1 ; 46 1217 0.29712 + DCW 0x0629 ; 47 1577 0.38501 + DCW 0x0800 ; 48 2048 0.50000 + DCW 0x09d7 ; 49 2519 0.61499 + DCW 0x0b3f ; 50 2879 0.70288 + DCW 0x0be3 ; 51 3043 0.74292 + DCW 0x0b9c ; 52 2972 0.72559 + DCW 0x0a7a ; 53 2682 0.65479 + DCW 0x08c3 ; 54 2243 0.54761 + DCW 0x06de ; 55 1758 0.42920 + DCW 0x053d ; 56 1341 0.32739 + DCW 0x0443 ; 57 1091 0.26636 + DCW 0x042b ; 58 1067 0.26050 + DCW 0x04fb ; 59 1275 0.31128 + DCW 0x0681 ; 60 1665 0.40649 + DCW 0x0862 ; 61 2146 0.52393 + DCW 0x0a2c ; 62 2604 0.63574 + DCW 0x0b72 ; 63 2930 0.71533 END