Amplitude issue at New sine test

Writing software that inputs and/or outputs audio and performs DSP algorithms such as filters, new codecs or audio effects.
Jaehoon
Senior User
Posts: 39
Joined: Wed 2015-05-20 14:59

Amplitude issue at New sine test

Postby Jaehoon » Wed 2016-01-27 12:13

Hello, VLSI engineer.

I have a problem at new sine test.

In normal state(with vs1053-vs1063-equalizer-130), below sine test program is exactly worked but below new sine test program does not work.
The problem is that new sine test's amplitude is very small. I attached captured image.

Could you support why it is occurred at new sine test?

1. Sine test code

unsigned char sine_test_on[] = {0x53, 0xef, 0x6e, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // 5168Hz.

WriteSci(SCI_MODE, SM_SDINEW | SM_TESTS | SM_RESET);
WriteSci(SCI_VOL, 0);
WriteSdi(sine_test_on, 16);

2. New Sine test code

WriteSci(SCI_MODE, SM_SDINEW | SM_TESTS | SM_RESET);
WriteSci(SCI_VOL, 0);
WriteSci(SCI_AICTRL0, 0x8000);
WriteSci(SCI_AUDATA, 0x07d0);
WriteSci(SCI_AIADDR, 0x4020); // Start New SINE test

Thanks,
Jaehoon.
Attachments
New_Sine_test.jpg
captured New sine test image
New_Sine_test.jpg (6.3 MiB) Viewed 720 times
Sine_test.jpg
captured Sine test image
Sine_test.jpg (6.09 MiB) Viewed 720 times

User avatar
pasi
VLSI Staff
Posts: 1329
Joined: Thu 2010-07-15 16:04

Re: Amplitude issue at New sine test

Postby pasi » Wed 2016-01-27 18:02

Have you tried other values than 0x8000 for the rate?

As far as I remember, 0x8000 means fs/2, which means
1) exactly fs/2 can not be represented even theoretically
2) only two different values from the sine table. The values may be 0 or close to 0 depending on where the sine phase starts from.
3) whatever signal there is will be effectively fully eliminated in the sample-rate converter.

Also, 0x07d0 for the rate is 2000Hz, and I think the samplerate setting function limits the low end to 8000Hz. (Did you mean 0x7d00 for 32000Hz?)

If you want to output 16kHz sine, then set AUDATA=0xbb80 (48000Hz), and AICTRL0=0x5555.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

User avatar
Henrik
VLSI Staff
Posts: 1013
Joined: Tue 2010-06-22 14:10

Re: Amplitude issue at New sine test

Postby Henrik » Thu 2016-01-28 12:23

Hello Jaehoon,

in addition to what Pasi said:
if you still have trouble with the sine test, please tell us what frequency you want to produce, and we will see how to generate the necessary parameters for it.

Kind regards,
- Henrik
Good signatures never die. They just fade away.

Jaehoon
Senior User
Posts: 39
Joined: Wed 2015-05-20 14:59

Re: Amplitude issue at New sine test

Postby Jaehoon » Thu 2016-01-28 15:22

Hello, Pasi,

Thanks for your quick answer.

I tested other values than 0x8000 for new sine test. It is work.

My product use the 7-band equalizer so we have to use the 7-band sine signal for testing.
// 64, 160, 400, 1000, 2500, 6250, 15600 Hz

Hello Henrik,

Could you send the necessary parameters for them.

Best Regards,
Jaehoon.

User avatar
Henrik
VLSI Staff
Posts: 1013
Joined: Tue 2010-06-22 14:10

Re: Amplitude issue at New sine test

Postby Henrik » Thu 2016-01-28 15:59

Hello Jaehoon!

Jaehoon wrote:My product use the 7-band equalizer so we have to use the 7-band sine signal for testing.
// 64, 160, 400, 1000, 2500, 6250, 15600 Hz

Hello Henrik,

Could you send the necessary parameters for them.


All right.

The VS1063a Datasheet Chapter 11.11.5, New Sine And Sweep Tests, says that:
SCI_AICTRLn = Fsin*65536/Fs.

Also, Fs = SCI_AUDATA, so SCI_AICTRLn = Fsin*65536/SCI_AUDATA

Some good combinations would be:
  • 64 Hz: 8000 to SCI_AUDATA, 524 to SCI_AICTRL0 and SCI_AICTRL1
  • 160 Hz: 8000 to SCI_AUDATA, 1311 to SCI_AICTRL0 and SCI_AICTRL1
  • 400 Hz: 8000 to SCI_AUDATA, 3277 to SCI_AICTRL0 and SCI_AICTRL1
  • 1000 Hz: 8000 to SCI_AUDATA, 8192 to SCI_AICTRL0 and SCI_AICTRL1
  • 2500 Hz: 8000 to SCI_AUDATA, 20480 to SCI_AICTRL0 and SCI_AICTRL1
  • 6250 Hz: 48000 to SCI_AUDATA, 8533 to SCI_AICTRL0 and SCI_AICTRL1
  • 15600 Hz: 48000 to SCI_AUDATA, 21299 to SCI_AICTRL0 and SCI_AICTRL1
Good signatures never die. They just fade away.

Jaehoon
Senior User
Posts: 39
Joined: Wed 2015-05-20 14:59

Re: Amplitude issue at New sine test

Postby Jaehoon » Fri 2016-01-29 19:36

Hello Henrik,

The received parameters are exactly worked. Thanks for your kindly supports.

Have a good weekend.
Jaehoon.

User avatar
Henrik
VLSI Staff
Posts: 1013
Joined: Tue 2010-06-22 14:10

Re: Amplitude issue at New sine test

Postby Henrik » Tue 2016-02-02 14:20

Hello Jaehoon,

good to hear!

Kind regards,
- Henrik
Good signatures never die. They just fade away.


Return to “DSP and Audio Software”

Who is online

Users browsing this forum: No registered users