AN2274 Freescale Semiconductor / Motorola, AN2274 Datasheet - Page 4

no-image

AN2274

Manufacturer Part Number
AN2274
Description
Generic Tone Generation on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Tone Generator Implementation
The actual implementation uses a factorized version of this formula with a finite number of elements and
normalized coefficients. A sixth-order polynomial provides sufficient precision for 16-bit coefficients;
furthermore, the same polynomial can be used to compute either sine or cosine, as follows:
Thus, the final polynomial approximation is as shown in Equation 4:
The corresponding normalized coefficients to be stored in memory are scaled by 2–7 (that is, m = 7) and listed in
Table 1.
2
The proposed tone generator synthesizes tones composed of up to two simultaneous frequencies with arbitrary
duration and frequency values. The method of defining tones is easy and flexible. The output signal is decomposed
into elementary components. Figure 1 shows an example of a possible desired tone.
4
Tone Generator Implementation
f1
f2
f3
Coefficients
Level
C
C
C
C
0
1
2
3
Generic Tone Generation on the StarCore™ SC140/SC1400 Cores, Rev. 1
cos
Component 1
(
2πf
n
)
Fractional Value
Figure 1. Example of a Desired Tone
Silence
=
–0.1542053
-0.6676025
0.0078125
0.5073242
Table 1. Normalized Coefficients
2
m
(
sin
(
(
c
x ( )
3
f
Component 2
2
n
+
=
c
2
cos
)f
2
n
Silence
+
x
c
1
)f
π
-- -
2
2
n
+
c
Component 1
60483 (0xEC43)
16624
43660 (0xAA8C)
16-bit Fixed Point
0
256
) c
,
k
=
(0x0100)
(0x40F0)
Silence
2 b
m
k
Freescale Semiconductor
Time
Equation 4

Related parts for AN2274