<< Chapter < Page Chapter >> Page >
In this section, we will go over the C code we used for the DSK board and the options for the signal input in testing the algorithm.

Code description

Our final implementation for the DSP board is written in C, and consists of two major functions, the interrupt serviceroutine and the main function. The samples arrive and are put into a buffer for each microphone channel by the McBSP1receive interrupt routine. This function keeps track of how full the buffers are, and sets a flag when they are full. Themain function waits for the buffer full flag, and processes the contents of the buffers when the flag is set. Thealgorithm is the same as the signal integration method described in the Matlab Simulation section. The code keeps an average of the last 128 region codes selected, which is the value that is output on the DSPboard's LEDs.

Signal input options

For our signal input, we have two options:

  • Ideal Signal generated in Matlab
  • Real signal from the microphone array.
To thoroughly test this algorithm, we tried both options, starting with the ideal signal, since this would help us indebugging. Later, we tried using a real signal, generated from a computer across the room. Unfortunately, within thisoption lies the danger of acoustics; the answer the algorithm gives us will even depend on the number of people in the room!

Questions & Answers

how to study physic and understand
Ewa Reply
what is conservative force with examples
Moses
what is work
Fredrick Reply
the transfer of energy by a force that causes an object to be displaced; the product of the component of the force in the direction of the displacement and the magnitude of the displacement
AI-Robot
why is it from light to gravity
Esther Reply
difference between model and theory
Esther
Is the ship moving at a constant velocity?
Kamogelo Reply
The full note of modern physics
aluet Reply
introduction to applications of nuclear physics
aluet Reply
the explanation is not in full details
Moses Reply
I need more explanation or all about kinematics
Moses
yes
zephaniah
I need more explanation or all about nuclear physics
aluet
Show that the equal masses particles emarge from collision at right angle by making explicit used of fact that momentum is a vector quantity
Muhammad Reply
yh
Isaac
A wave is described by the function D(x,t)=(1.6cm) sin[(1.2cm^-1(x+6.8cm/st] what are:a.Amplitude b. wavelength c. wave number d. frequency e. period f. velocity of speed.
Majok Reply
what is frontier of physics
Somto Reply
A body is projected upward at an angle 45° 18minutes with the horizontal with an initial speed of 40km per second. In hoe many seconds will the body reach the ground then how far from the point of projection will it strike. At what angle will the horizontal will strike
Gufraan Reply
Suppose hydrogen and oxygen are diffusing through air. A small amount of each is released simultaneously. How much time passes before the hydrogen is 1.00 s ahead of the oxygen? Such differences in arrival times are used as an analytical tool in gas chromatography.
Ezekiel Reply
please explain
Samuel
what's the definition of physics
Mobolaji Reply
what is physics
Nangun Reply
the science concerned with describing the interactions of energy, matter, space, and time; it is especially interested in what fundamental mechanisms underlie every phenomenon
AI-Robot
what is isotopes
Nangun Reply
nuclei having the same Z and different N s
AI-Robot
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Audio localization. OpenStax CNX. Jun 06, 2011 Download for free at http://cnx.org/content/col10250/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Audio localization' conversation and receive update notifications?

Ask