Two questions, hopefully simple:

**1. Can the Old Sine Test output a frequency of 25Hz?**

2. For the New Sine Test, how do I find/know/set the Fs value? (in order to use the equation given for what to write to SCI_AICTRLn)

2. For the New Sine Test, how do I find/know/set the Fs value? (in order to use the equation given for what to write to SCI_AICTRLn)

Background: I'm using the VS1053b on a breakout board from Adafruit (https://www.adafruit.com/product/1381). Controlling the vs1053 with an Arduino Uno and writing a program in a .ino script. I'm using the Adafruit VS1053 Library from github to help code (https://github.com/adafruit/Adafruit_VS1053_Library).

Just trying to use the sine test following the vs1053 datasheet pg. 67-68 (https://www.vlsi.fi/fileadmin/datasheets/vs1053.pdf). Trying both the old test and the new test.

**Old Sine Test**:

Can the sine test output a sine wave of 25Hz?

To make sure I'm even using it right, here's what I wrote to play a sine at test frequency of about 1000Hz.

Code: Select all

```
void sineTest() {
int n = 0b1111011; // ~1000Hz. FsIdx = 0b111 = 7 which makes Fs = 12000.
// S = 1000Hz*128/12000 = 11(ish) = 0b1011. So n = 0b1111011
reset(); // hard reset.
sciWrite(0x0, 0x0020); // 0x0 is the SCI_MODE register. 0x0020 is 0b10000 which assigns 1 to the SM_TESTS bit (bit 5)
spiwrite(0x53);
spiwrite(0xEF);
spiwrite(0x6E);
spiwrite(n);
spiwrite(0x00);
spiwrite(0x00);
spiwrite(0x00);
spiwrite(0x00);
}
```

**New Sine Test**

I believe I know what to write in my script for this, except I'm lost at the samplerate (Fs) value.

What is the value to use for Fs in the equation SCI_AICTRLn = Fsin * 65536/Fs ? Do I need to assign a samplerate on the chip before starting the sine test? If so, how? Can the New Sine Test do a 25Hz sine wave?