User Manual

VS1003
8 FUNCTIONAL DESCRIPTION
8.6.5 SCI_DECODE_TIME (RW)
When decoding correct data, current decoded time is shown in this register in full seconds.
The user may change the value of this register. In that case the new value should be written
twice.
SCI_DECODE_TIME is reset at every software reset and also when WAV (PCM or IMA AD-
PCM), WMA, or MIDI decoding starts or ends.
8.6.6 SCI_AUDATA (RW)
When decoding correct data, the current sample rate and number of channels can be found in
bits 15:1 and 0 of SCI_AUDATA, respectively. Bits 15:1 contain the sample rate divided by two,
and bit 0 is 0 for mono data and 1 for stereo. Writing to SCI_AUDATA will change the sample
rate directly.
Note: due to a bug, an odd sample rate reverses the operation of the stereo bit in VS1003b.
Example: 44100 Hz stereo data reads as 0xAC45 (44101).
Example: 11025 Hz mono data reads as 0x2B10 (11025).
Example: 11025 Hz stereo data reads as 0x2B11 (11026).
Example: Writing 0xAC80 sets sample rate to 44160 Hz, stereo mode does not change.
8.6.7 SCI_WRAM (RW)
SCI_WRAM is used to upload application programs and data to instruction and data RAMs.
The start address must be initialized by writing to SCI_WRAMADDR prior to the first write/read
of SCI_WRAM. As 16 bits of data can be transferred with one SCI_WRAM write/read, and the
instruction word is 32 bits long, two consecutive writes/reads are needed for each instruction
word. The byte order is big-endian (i.e. most significant words first). After each full-word
write/read, the internal pointer is autoincremented.
8.6.8 SCI_WRAMADDR (W)
SCI_WRAMADDR is used to set the program address for following SCI_WRAM writes/reads.
Address offset of 0 is used for X, 0x4000 for Y, and 0x8000 for instruction memory. Peripheral
registers can also be accessed.
SM_WRAMADDR Dest. addr. Bits/ Description
Start. . . End Start. . . End Word
0x1800. . . 0x187F 0x1800. . . 0x187F 16 X data RAM
0x5800. . . 0x587F 0x1800. . . 0x187F 16 Y data RAM
0x8030. . . 0x84FF 0x0030. . . 0x04FF 32 Instruction RAM
0xC000. . . 0xFFFF 0xC000. . . 0xFFFF 16 I/O
Only user areas in X, Y, and instruction memory are listed above. Other areas can be accessed,
but should not be written to unless otherwise specified.
Version: 1.08, 2014-12-19 33