AN2274 Freescale Semiconductor / Motorola, AN2274 Datasheet - Page 12

no-image

AN2274

Manufacturer Part Number
AN2274
Description
Generic Tone Generation on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Using and Testing the Generic Tone Generator
12
UINT16 DTMFl[] = {697, 770, 852, 941};
UINT16 DTMFh[] = {1209, 1336, 1477, 1633};
void
test_initialize(TONE_GENERIC * testcases)
// testcases must point to a 16-item TONE_GENERIC structure
{
Generic Tone Generation on the StarCore™ SC140/SC1400 Cores, Rev. 1
int i, j;
for (i = 0; i < 16; i++) {
}
// DTMF digits
// Key:
// Code:
for (i = 0; i < 4; i++) {
// Inialize the input structures for the i+1 key
testcases[i].tone_repeat_cycle = 1;
testcases[i].tone_component_count = 1;
// 1 tone_component description
testcases[i].tone_component[0].flags = 0x0;
testcases[i].tone_component[0].repeat_component = 1;
testcases[i].tone_component[0].sound_duration = 50;
testcases[i].tone_component[0].silence_duration = 50;
testcases[i].tone_component[0].level_1 = 10;
testcases[i].tone_component[0].level_2 = 10;
1| 2| 3| 4| 5| 6| 7| 8| 9| 0| *| #| A| B| C| D
1| 2| 3| 5| 6| 7| 9|10|11|14|13|15| 4| 8|12|16
Figure 6. Testing Set-Up
Example 2. DTMF
Freescale Semiconductor

Related parts for AN2274