Hardware Reference
In-Depth Information
Figure 10.17 Example of using DADiSP to carry out a simple FFT-based
analysis (shown in W6) of a synthesized square wave (shown in W5)
The resulting frequency spectrum (shown in W6) is generated using a Fourier
transform of the data shown in W5. Although this is only a simple example it
will hopefully serve to illustrate something of how the software works and its
potential for use in applications that require the display and subsequent analysis
of data.
Using DADiSP's Series Programming Language
DADiSP's Series Programming Language (SPL) is based on C/C ++ and pro-
vides users with a means of extending the standard functions provided by
DADiSP. SPL files can contain a single function or a collection of functions.
As with C/C ++ , SPL functions are not case sensitive and have the following
form:
function_name(optional argument list)
{
local declarations;
statements;
}
As an example, the following SPL function provides the means of returning a
temperature in centigrade from an argument given in Fahrenheit:
/* Convert Fahrenheit to centigrade */
celsius(f)
{
local c;
c = (5.0 / 9.0) * (f - 32.0);
return(c);
}
Search WWH ::




Custom Search