السلام عليكم و رحمة الله .............
أريد مساعدتكم العاجله جزاكم الله خيرا ...........
سأقوم بوصل هذه الداره والتي تتكون من ميكروفون و دارات اخرى بعدهل لتحويل الصوت الى اشارة كهربائية قبل ادخالها الى ال A/D pin في المتحكم PIC16F877A و ذلك لمعرفة هل تعدى الصوت حدود معينة أم لا ثم سأقوم بجعل ضوء LED يضيء ك output في حال حدوث ذلك
ما احتاجة هو كتابة برنامج بسيط بلغة ال MikroBasic ليقوم بهذه العملية عن طريق برمجته على ال PIC
ارجووووووووووووووووكم انا بحاجــــــــــــــــــــــــــــــــــه ماسة لمســـــــــــــــــــاعدتـــــــــــــكم أخواني !!! :(
وللمزيد يمكنكم قراءه ما كتبتة ايضا باللغة الانجليزية
Hello Guys ...
Now i really reallyyyyyyyyyyyyyyyyy need help with this ! :(
i will connect this circuit ( see the uploaded picture please) to the A/D pin in the PIC16F877A micro controller that will take the signal generated by this circuit and do some processing to see if the recived voltage is within the range we need or not ..
This circuit is simply a microphone that is connect to an offset and scaling circuit , and then its output is connected to 2ed order LP butterworth Fc= 2 KHz ... so the signal is first converted to an electrical signal and then conditioned before it is fed to the A/D pin in the PIC16F877A ...
what i need is to write a program from the PIC16F877A using MikroBasic in order to measure the input signal and if it exceeds any fixed vales ( you can suppose any value you want) then a signal will be sent to make some LED to be turned ON or cause a Buzzer to generate sound ..
***do a simple program will do the job? ... i mean just read the input value to the A/D pic and compare it with some vale ( that we choose) and then send a signal to the output pin ??? ...
***and there is another idea , that someone told me about , he told me that this can be done by sampling the input signal at a sufficient sampling rate and calculating the average over a small interval. This average can then be used to describe the noise level at some instance of time along a discrete time axis. Performing this over several intervals and acquiring the average of those intervals will then provide a good measure of the noise generated over time and prevent spurious activation of the visual indicators.
Since the input signal is biased such that the amplitude is always positive, squaring of the signal to eliminate algebraic cancellation during averaging is not necessary and its exclusion aids in reducing computational workload. The significant portion of energy pertaining to human generated speech is well below 1000 Hz. The current sampling rate of 4 kHz is used to obtain an accurate measure of the noise level. Sampling at this rate is achieved by using a timer interrupt that occurs periodically approximately every 250 μsec. To achieve this, Timer 1 is preloaded with a value such that timer overflow occurs every millisecond. Each time the timer overflows a timer 1 interrupt service routine (ISR) initiates an A/D conversion and disables timer 1 operation . Once the conversion is complete, an A/D interrupt occurs. An A/D ISR is then invoked; inside this ISR the A/D value corresponding to the current noise level is stored (for subsequent processing) and timer 1 is reloaded with the appropriate value and is re-enabled
Inside the main loop of the program a running average pertaining to the A/D values corresponding to the noise is computed and stored for subsequent determination as to whether or not the visual indicators (i mean like a LED connected as an output from the PIC) are to be turned on or off.....
please helpppppppppppp me GUYSSSSSSSSSSS i really need help ............. :(
Regards,
SAMER
بارك الله فيكم