AN2274 Freescale Semiconductor / Motorola, AN2274 Datasheet - Page 2

no-image

AN2274

Manufacturer Part Number
AN2274
Description
Generic Tone Generation on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Digital Sine Wave Generation
core of the tone generator (second component) relies on a digital oscillator. We tested this approach with a large
number of signaling tones (such as DTMF, MF-R1, MF-R2), and it showed a good compromise in terms of
performance, memory requirements, and precision. The module requires less than 0.1 MCPS, which can be
improved with further hand-optimization of the assembly code. We also verified compliance with related ITU-T
standards in terms of frequency accuracy, using both FFT magnitude plots of actual data generated from the
module and real-time measurements with a spectrum analyzer.
Further functionality can be added if needed. For example, tones with more than two frequencies—modulation
with carrier, among others—can easily be incorporated into the module.
1
The most common ways to synthesize sine waves are:
The proposed tone generator employs both the digital oscillator and polynomial approximation methods.
1.1 Digital Oscillator
The core of the tone generation module is a digital oscillator [3], that is, an IIR filter whose poles are on the unit
circle. Our implementation uses a second-order filter, from which single-frequency tones are generated. The phase
(θ) of the pole is related to the frequency of the synthesized sine wave:
The equation for the oscillator is given as follows:
where x(n) is a sine wave signal, f is the required frequency, and fs is the sampling frequency.
The amplitude and phase of the sine wave are determined by the initial states x (–1) and x (–2). Depending on
initial conditions, either a cosine or a sine signal is generated by a digital oscillator. This algorithm has two main
advantages:
2
Digital Sine Wave Generation
Table look-up. Offers the lowest complexity but is not used in the proposed tone generator because it
cannot guarantee high precision with reasonable table sizes.
Polynomial approximation. Offers the same high precision for every frequency, but requires the
highest computational complexity.
Digital oscillator. Uses the intrinsic properties of trigonometric functions, which can be implemented
with low memory and computational complexity and usually exceed precision requirements.
Low data and program memory requirements
Low computational complexity
Generic Tone Generation on the StarCore™ SC140/SC1400 Cores, Rev. 1
x n ( )
=
2.
cos
θ
2πf
------- -
f
s
=
2πf f
x n 1
(
s
) x n 2
(
)
Freescale Semiconductor
Equation 1

Related parts for AN2274