Ultrasonic Audio File Player

Dependencies:   mbed

Fork of TAU_ZOOLOG_Chirp_Generator by Yossi_Students

Revision:
26:c07bf3beb241
Parent:
25:060831b7aadd
Child:
27:2091f3f4b96b
--- a/main.cpp	Sun Jul 15 09:10:00 2018 +0000
+++ b/main.cpp	Sun Jul 15 10:32:14 2018 +0000
@@ -17,7 +17,7 @@
 #include "signal.h"
 #define PULSE_RATE 10.0f // in HZ
 #define FREQ_POT_EN // Potentiometer to set PULSE Rate
-#define MIN_FREQ 0.5f //(HZ)
+#define MIN_FREQ 0.1f //(HZ)
 #define SAMPLE_RATE_375_KHZ // basic sample rate is 1Mhz, this mode adds delay in between sample to meet the audio sample rate
 
 float pulseRate=PULSE_RATE;
@@ -94,18 +94,20 @@
                 NOP();
                 NOP();
                 NOP();
+                NOP();
+                NOP();
                 
                 #ifdef SAMPLE_RATE_375_KHZ
                 // generate delay
-                for (int jj=0; jj<62; jj++) {
+                for (int jj=0; jj<61; jj++) {
                     NOP();
                 }
                 // micro nops :)
-                //NOP();
-                //NOP();
-                //NOP();
-                //NOP();
-                //NOP();
+                NOP();
+                NOP();
+                NOP();
+                NOP();
+                NOP();
                 #endif
                 // Output value using DAC
                 // HAL_DAC_SetValue(&hdac1, DAC_CHANNEL_1, DAC_ALIGN_12B_R, ADCValueOut);