|
|
View previous topic :: View next topic |
Author |
Message |
curt2go
Joined: 21 Nov 2003 Posts: 200
|
VS1053 Help |
Posted: Thu Apr 14, 2016 10:54 pm |
|
|
I have been working at this for way too long now. The rundown is that I am using a Microe demo board with their demo VS1053 on it. I know the hardware works and I am able to write correctly to it as I am able to get it into test mode and it work properly. Also when I started feeding this info I read the HDAT0 and HDAT1 and I had valid info in those registers. My issue is that I am trying to feed it from RAM just to get it working before I start feeding it with an SD card. I made a little program in VB to convert the file for me into ints so I can just put them in the program. So I am at a loss. It does make sound but this file is just a 440Hz sine wave. I will add the file here as well. (I actually don't know how to add it. ??)
I have tried to push them in one at a time as well and it does the same thing. It does sound like parts of it are putting the right sound out either writing one at a time of 32 at a time.
I am using 5.056 compiler 18F87K22. I have tried search and the internet for many nights.
I am running at 32MHz and I can see that all the SPI is working properly and the fact that I could get it into test as well.
Here is the code. Thanx for any help to shed some light on this.
/**************************************************************************************************
* Function MP3_SCI_Write()
* -------------------------------------------------------------------------------------------------
* Overview: Function writes one byte to MP3 SCI
* Input: register address in codec, data
* Output: Nothing
**************************************************************************************************/
void MP3_SCI_Write(int address,long int data_in) {//was unsigned int
int hi_;
int lo_;
hi_ = make8(data_in,1);
lo_ = make8(data_in,0);
BSYNC_HI;// = 1;
MP3_CS_LO;// = 0; // select MP3 SCI
spi_write(WRITE_CODE);
spi_write(address);
spi_write(hi_); // high byte
spi_write(lo_); // low byte
//SPI_WRITE(data_in);
MP3_CS_HI;// = 1; // deselect MP3 SCI
while (DREQ == 0) // wait until DREQ becomes 1, see MP3 codec datasheet, Serial Protocol for SCI
;
}
/**************************************************************************************************
* Function MP3_SCI_Read()
* -------------------------------------------------------------------------------------------------
* Overview: Function reads words_count words from MP3 SCI
* Input: start address, word count to be read
* Output: words are stored to data_buffer
**************************************************************************************************/
void MP3_SCI_Read(char start_address, char words_count, unsigned int16 *data_buffer) {
unsigned int16 temp;
MP3_CS_LO;// = 0; // select MP3 SCI
spi_write(READ_CODE);
spi_write(start_address);
while (words_count) { // read words_count words byte per byte
words_count--;
temp = make16(spi_get(),spi_get());
*data_buffer = temp;
}
MP3_CS_HI;// = 1; // deselect MP3 SCI
while (DREQ == 0) // wait until DREQ becomes 1, see MP3 codec datasheet, Serial Protocol for SCI
;
}
/**************************************************************************************************
* Function MP3_SDI_Write()
* -------------------------------------------------------------------------------------------------
* Overview: Function write one byte to MP3 SDI
* Input: data to be writed
* Output: Nothing
**************************************************************************************************/
void MP3_SDI_Write(char data_) {
int y;
MP3_CS_HI;// = 1;
BSYNC_LO;// = 0;
while (DREQ == 0){} // wait until DREQ becomes 1, see MP3 codec datasheet, Serial Protocol for SCI
spi_write(data_);
BSYNC_HI;// = 1;
}
/**************************************************************************************************
* Function MP3_SDI_Write_32
* -------------------------------------------------------------------------------------------------
* Overview: Function Write 32 bytes to MP3 SDI
* Input: data buffer
* Output: Nothing
**************************************************************************************************/
void MP3_SDI_Write_32(long int fff){//char *data_) {
long int i;
MP3_CS_HI;// = 1;
BSYNC_LO;// = 0;
while (DREQ == 0){
} // wait until DREQ becomes 1, see MP3 codec datasheet, Serial Protocol for SCI
//delay_us(10);
for (i=0; i<32; i++){
spi_write(blaster[fff+i]);
}
BSYNC_HI;// = 1;
}
/**************************************************************************************************
* Function MP3_Set_Volume()
* -------------------------------------------------------------------------------------------------
* Overview: Function set volume on the left and right channel
* Input: left channel volume, right channel volume
* Output: Nothing
**************************************************************************************************/
void MP3_Set_Volume(char left, char right) {
unsigned int16 volume;
// volume = (left<<8) + right; // calculate value
volume = make16(left,right); // calculate value
MP3_SCI_Write(SCI_VOL_ADDR, volume); // Write value to VOL register
}
//====================================== MAIN
void main(void) {
long int i;
long int file_size = 30318;
long int count = 0;
delay_ms(1000);//let the processor get ready
setup_oscillator(OSC_8MHZ | OSC_PLL_ON);
enable_interrupts(global);
enable_interrupts(int_rda);
setup_spi(SPI_MASTER|SPI_CLK_DIV_64|SPI_SAMPLE_AT_MIDDLE|SPI_SCK_IDLE_LOW|SPI_XMIT_L_TO_H);
//#use spi (MASTER, SPI1, BAUD=100000, MODE=0, BITS=8, STREAM=SPI_1)
//inits();//init SPI...
output_high(pin_B1);//sets the b1 to an output
output_high(pin_E1);//sets the b1 to an output
//input(pin_a1);
BSYNC_HI;// = 1;
MP3_CS_HI;// = 1;
// Hardware reset
MP3_RST_LO;// = 0;
Delay_ms(1000);
MP3_RST_HI;// = 1;
while (DREQ == 0) // wait until DREQ becomes 1, see MP3 codec datasheet, Serial Protocol for SCI
;
//send a couple dummy SPI writes..
//MP3_SDI_Write(0xFF);
//MP3_SDI_Write(0xFF);
//MP3_SDI_Write(0xFF);
MP3_SCI_READ(SCI_MODE_ADDR,1,i);
// MP3_SCI_Write(SCI_MODE_ADDR, 0x0800);//this will alow tests.. tests is 0x0820
// MP3_SCI_Write(SCI_BASS_ADDR, 0x7A00);
//MP3_SCI_Write(SCI_AUDATA_ADDR, 0xBB80);//48bps
MP3_SCI_Write(SCI_CLOCKF_ADDR, 0x6000); // default 12 288 000 Hz
//MP3_SCI_READ(SCI_MODE_ADDR,1,i);
// Maximum volume is 0x00 and total silence is 0xFE.
volume_left = 50;
volume_right = 50;
MP3_Set_Volume(volume_left, volume_right);
//MP3_SCI_READ(SCI_MODE_ADDR,1,i);
Delay_ms(1000);
setup_spi(SPI_MASTER|SPI_CLK_DIV_4|SPI_SAMPLE_AT_MIDDLE|SPI_SCK_IDLE_LOW|SPI_XMIT_L_TO_H);
while (file_size > BUFFER_SIZE) {
/*for (i=0; i<BUFFER_SIZE; i++) {//send everything in the file in 32byte packets
mp3_buffer[i] = blaster[i];
}
*/
for (i=0; i<BUFFER_SIZE/BYTES_2_WRITE; i++) {
//MP3_SDI_Write_32(mp3_buffer + i*BYTES_2_WRITE);//this points where to start writing from as a pointer.
MP3_SDI_Write_32(count);//this points where to start writing from as a pointer.
count = count + 32;
}
//if(++count > 4){
//MP3_SCI_READ(SCI_HDAT0_ADDR,1,i);
//MP3_SCI_READ(SCI_HDAT1_ADDR,1,i);
//}
// count = 0;
file_size = file_size - BUFFER_SIZE;
}
/* MP3_SDI_Write(0x53);
delay_ms(1);
MP3_SDI_Write(0xEF);
delay_ms(1);
MP3_SDI_Write(0x6E);
delay_ms(1);
MP3_SDI_Write(1);
delay_ms(1);
MP3_SDI_Write(0x0);
delay_ms(1);
MP3_SDI_Write(0x0);
delay_ms(1);
MP3_SDI_Write(0x0);
delay_ms(1);
MP3_SDI_Write(0x0);
*/
while(TRUE){
}
}
Here is the Const Int as well
const int blaster[30318] = {73,68,51,2,0,0,0,0,0,23,84,84,50,0,0,17,0,52,52,48,72,122,32,83,105,110,101,32,87,97,118,101,0,255,251,48,196,0,0,0,0,1,
164,20,0,0,32,241,138,230,99,60,160,0,8,177,193,8,18,0,3,252,96,0,11,66,97,100,32,38,146,175,223,254,96,110,2,224,224,7,57,249,74,
51,5,224,24,255,135,229,230,1,160,70,96,0,1,154,147,128,200,47,123,152,23,224,220,71,246,203,16,128,190,69,170,0,0,2,78,75,112,0,1,77,
114,46,4,5,152,80,122,112,164,161,186,72,6,13,0,46,40,53,221,96,52,249,101,157,47,21,118,53,93,182,58,2,65,142,181,1,38,21,21,9,33,
179,101,145,83,70,198,196,195,17,192,176,98,152,116,171,25,67,84,152,50,132,18,25,80,255,251,50,196,37,2,199,24,85,81,189,193,128,56,202,133,35,
129,223,240,76,127,84,25,73,132,9,24,58,33,81,156,154,192,110,69,97,195,205,103,42,82,27,8,72,36,83,78,7,158,41,47,175,133,85,0,0,22,
195,13,168,0,0,196,84,184,189,32,115,24,152,25,157,31,39,156,252,23,137,18,193,212,72,196,61,21,144,38,78,205,101,85,120,166,237,206,223,244,244,
89,82,91,86,193,168,2,218,21,84,168,8,70,92,192,70,48,39,16,211,24,200,191,49,133,16,179,2,224,70,57,228,206,16,140,28,66,52,120,69,240,
234,33,90,196,140,83,156,255,119,247,75,170,1,2,1,150,73,255,251,50,196,51,2,70,16,172,119,2,112,190,133,39,117,175,96,78,6,126,37,155,20,
208,117,230,105,134,90,20,225,170,36,168,177,169,22,19,209,134,32,3,73,199,75,102,57,81,152,101,120,100,139,9,139,141,37,158,112,95,105,146,6,191,
255,251,76,37,26,12,1,47,204,82,84,12,199,167,76,30,129,255,140,202,63,97,12,197,193,251,140,33,240,167,206,125,102,55,66,240,225,167,243,146,50,
141,124,50,14,41,166,99,207,20,151,215,194,170,64,0,23,192,108,0,0,0,89,144,52,149,200,56,198,40,17,158,167,170,121,193,8,145,57,26,25,130,
249,25,16,84,81,156,145,181,255,251,50,196,70,130,198,168,35,32,174,127,130,96,205,5,35,129,223,240,76,185,71,251,123,191,94,147,7,134,83,2,139,
163,23,212,179,54,41,67,8,68,126,147,54,131,205,147,53,84,125,179,9,8,41,163,165,218,205,214,197,56,82,32,228,109,211,94,142,67,9,137,158,234,
69,229,148,153,215,1,132,1,150,201,198,124,42,155,4,248,117,103,153,134,54,24,145,169,52,196,129,168,46,23,129,133,248,4,185,195,200,102,41,76,152,
181,108,101,170,201,143,12,165,146,107,46,20,166,231,3,159,255,65,131,35,1,130,165,185,141,10,49,157,52,105,132,108,62,129,157,47,224,193,156,136,62,
17,255,251,48,196,86,0,197,80,172,115,2,112,205,133,35,129,223,240,76,132,206,20,169,213,173,134,236,101,28,37,38,113,231,113,174,7,193,4,245,32,
235,197,37,245,194,54,42,32,0,22,195,13,176,0,0,91,80,49,139,122,113,49,137,2,137,206,57,105,204,2,88,24,138,26,98,134,35,40,134,6,88,
57,52,201,202,233,80,223,157,191,233,232,234,55,240,227,104,48,72,93,48,112,178,49,213,67,51,234,132,48,150,199,183,51,224,187,73,51,202,199,169,48,
162,2,142,59,13,188,221,237,19,131,38,142,54,255,53,185,20,32,144,159,110,164,94,89,83,58,234,32,0,22,194,221,255,251,50,196,106,130,198,180,39,
32,174,127,130,112,206,4,227,129,223,240,76,176,0,0,101,1,176,160,39,31,42,96,202,15,6,100,200,208,102,38,14,70,11,192,14,5,198,22,172,8,
144,3,58,7,14,137,72,153,6,229,8,74,82,45,21,143,63,251,85,243,240,155,148,105,149,170,27,89,194,32,0,112,22,6,3,137,70,14,146,230,53,
34,70,115,197,38,17,96,213,6,115,30,104,70,112,128,211,198,18,152,70,231,60,160,27,57,116,110,20,105,188,29,70,154,30,6,14,213,226,107,178,199,
126,158,145,255,245,105,0,2,128,228,0,12,220,103,52,121,216,218,203,19,188,213,140,54,65,255,251,50,196,121,128,198,64,172,119,2,112,205,5,35,129,
223,240,76,14,205,103,216,87,205,94,161,5,76,51,208,61,142,52,32,48,146,120,202,140,147,68,222,140,182,112,48,64,5,135,53,152,106,232,21,255,239,
247,250,140,4,20,204,44,42,140,135,77,205,24,156,12,41,241,222,77,20,14,92,77,13,209,219,204,44,96,160,142,239,115,55,139,124,224,10,195,136,199,
205,98,79,7,17,19,237,212,139,203,42,103,95,255,253,117,0,2,64,204,0,12,222,104,52,113,244,218,107,163,185,90,204,53,81,28,141,97,136,193,141,
88,145,19,12,50,160,67,78,30,13,48,58,100,203,236,67,255,251,50,196,138,128,71,236,79,61,172,122,98,112,234,133,35,229,223,240,76,73,92,204,192,
111,48,88,1,118,179,168,100,56,28,255,71,254,27,56,4,13,16,12,35,204,122,65,141,1,133,204,38,97,155,140,253,188,97,140,247,225,153,140,40,112,
138,78,153,66,54,131,16,219,105,179,116,65,13,36,70,7,13,214,162,87,178,199,46,158,193,255,255,253,74,1,136,1,155,141,102,141,64,27,57,138,118,
187,225,134,132,37,73,171,95,36,249,170,64,36,25,134,50,9,0,72,32,16,146,51,50,252,211,118,163,51,155,12,24,1,93,204,230,53,87,161,183,127,
200,32,0,7,107,134,16,33,255,251,48,196,145,130,71,104,37,31,46,127,130,96,216,133,35,129,223,240,72,212,17,96,184,204,94,48,45,9,115,27,101,
59,49,173,9,115,3,0,34,53,164,180,229,216,0,148,32,240,37,180,52,93,109,114,24,151,134,87,223,222,180,255,93,0,0,5,160,10,0,0,0,138,
197,201,50,144,241,243,5,176,152,50,236,85,67,45,144,146,48,84,1,50,139,38,216,84,0,12,162,172,187,21,220,254,131,32,207,250,173,65,40,112,97,
185,10,100,81,244,104,204,2,97,78,12,88,104,155,223,20,104,104,12,80,97,92,132,54,117,202,17,180,25,134,213,84,155,122,56,104,194,112,56,102,181,
255,251,50,196,156,2,71,96,35,31,46,127,130,96,225,133,35,225,223,240,76,28,120,114,54,24,32,0,23,195,13,176,0,0,128,82,203,23,116,206,195,
12,134,51,121,251,115,118,5,243,11,192,68,161,104,201,202,21,49,164,206,45,49,102,86,52,103,126,205,58,115,73,160,4,12,140,204,120,128,52,155,212,
228,159,67,10,212,96,147,71,98,231,83,69,188,96,83,11,64,33,3,177,208,77,162,209,54,130,184,219,50,147,68,148,193,66,197,174,226,67,241,128,58,
0,0,13,162,166,50,18,64,34,56,116,193,28,35,140,155,148,24,201,124,34,12,16,128,76,120,203,100,186,192,72,255,251,50,196,166,0,70,196,39,30,
174,127,130,112,202,5,40,53,143,96,78,128,138,253,89,98,80,232,84,57,232,40,8,0,176,184,200,103,179,76,59,14,95,231,48,179,5,226,52,157,237,
80,52,130,5,224,48,185,66,7,59,69,0,218,13,67,102,173,77,165,50,52,33,88,20,47,87,11,173,220,127,233,233,51,255,69,0,0,22,194,129,176,
0,0,169,82,24,179,166,187,24,28,3,249,144,138,70,153,1,3,217,129,168,7,36,11,62,68,208,74,142,104,105,178,228,193,113,172,229,75,107,126,255,
243,209,217,99,1,67,243,25,138,3,54,83,51,104,39,3,15,36,119,115,98,235,147,211,255,251,50,196,181,130,197,192,35,61,172,123,2,112,199,132,163,
213,223,240,77,96,156,119,115,15,144,41,195,242,233,206,33,56,99,224,226,122,83,87,159,204,68,2,74,246,185,15,198,41,3,214,255,255,218,50,100,160,
50,192,205,51,229,58,54,146,95,48,240,199,74,54,60,184,168,54,19,71,26,48,224,129,249,56,73,104,197,137,51,97,182,142,5,167,53,114,4,196,96,
68,125,119,165,161,80,103,209,255,255,255,255,255,255,255,255,253,6,9,8,70,64,150,102,129,42,198,246,214,166,35,145,8,198,232,15,234,70,226,145,8,
198,36,136,93,231,26,60,70,159,42,70,151,164,230,154,62,255,251,48,196,201,128,198,56,172,119,2,112,199,4,163,213,207,240,77,70,98,19,6,21,129,
40,40,215,223,200,221,61,131,234,255,255,171,255,255,255,255,255,255,255,255,250,147,16,83,81,106,50,88,163,50,180,210,51,193,69,54,102,112,48,233,7,
129,54,12,250,63,53,228,135,83,48,216,194,12,55,161,188,199,104,99,101,52,206,23,152,53,169,240,196,128,52,174,113,101,195,14,250,127,255,255,255,255,
255,255,255,255,164,193,208,236,200,130,168,208,213,44,223,170,128,196,147,32,20,221,200,245,124,221,21,32,36,196,172,11,112,227,183,124,211,213,92,210,132,
184,210,184,4,203,210,255,251,50,196,219,2,69,32,35,62,140,123,2,112,218,133,99,229,207,240,76,124,194,128,41,5,218,227,255,24,164,182,229,255,255,
215,255,255,255,255,255,255,255,255,253,105,136,41,168,181,85,85,85,50,92,164,50,160,215,51,165,76,54,42,129,48,225,71,180,53,218,187,194,53,179,199,
134,48,208,130,35,55,26,0,200,199,179,106,178,14,37,139,53,193,220,196,224,36,173,113,165,183,196,223,119,255,255,255,255,255,255,255,255,247,24,72,24,
25,34,80,154,40,158,28,19,68,152,149,195,224,27,208,253,169,27,185,195,227,24,152,225,101,156,128,237,26,116,173,26,66,155,154,65,7,25,108,81,255,
251,50,196,239,2,70,80,45,65,172,123,2,112,221,132,227,65,223,240,72,24,74,5,162,131,59,127,35,116,246,30,175,255,255,255,255,255,255,251,255,255,
239,255,250,147,16,83,81,85,85,85,85,50,80,165,50,148,218,51,129,85,53,238,146,48,217,7,229,53,166,253,49,53,128,135,183,48,199,194,52,54,114,
76,202,102,227,110,47,206,55,122,53,249,200,197,0,20,114,113,101,215,180,27,244,255,255,255,255,255,255,255,255,255,73,133,161,73,146,196,193,163,169,137,
194,147,129,137,150,59,217,190,117,201,121,188,250,60,9,137,192,21,193,200,238,185,167,42,249,163,9,225,162,176,217,149,229,255,251,50,196,254,3,199,172,
35,26,14,255,130,65,11,133,35,1,223,244,72,57,132,64,98,41,179,135,254,49,73,111,150,255,255,219,255,255,255,255,250,19,16,83,81,76,203,142,77,
213,85,85,85,50,84,166,50,128,223,51,101,92,53,178,163,48,208,72,18,53,112,62,140,53,75,71,230,48,190,130,73,53,218,144,203,198,19,114,173,14,
69,109,54,17,180,197,32,4,113,113,162,183,246,12,250,63,255,255,255,255,255,255,255,255,160,196,0,152,203,114,156,213,37,56,231,26,188,197,150,32,200,
228,85,250,96,227,120,32,248,197,173,12,20,234,40,88,214,70,88,211,181,204,211,41,216,204,3,255,251,48,196,255,131,199,152,35,26,14,255,130,65,10,
133,35,1,223,244,72,24,194,144,76,188,12,61,216,135,233,236,26,87,255,253,95,255,255,255,255,223,255,255,127,255,212,152,130,154,138,170,50,72,167,50,
116,226,51,65,101,53,118,176,48,199,136,63,53,55,127,211,53,19,136,19,48,181,66,90,53,34,212,205,101,67,118,42,206,83,92,54,73,152,4,85,73,
39,86,69,120,87,255,255,255,255,255,255,255,255,255,239,49,44,27,50,248,154,53,109,63,57,242,146,49,108,199,219,57,66,187,243,57,10,71,233,49,113,
2,238,58,158,17,53,133,153,52,193,122,52,158,131,50,228,203,48,255,251,50,196,255,131,199,164,37,26,14,255,130,65,12,133,35,1,223,244,72,152,20,
64,59,12,118,225,138,75,110,95,255,253,127,255,255,255,255,221,255,255,119,251,189,105,136,41,168,181,85,85,85,49,236,144,50,8,199,50,173,58,52,122,
101,48,166,71,92,52,95,185,20,52,65,199,54,48,149,130,29,51,202,160,204,67,147,105,162,14,13,31,53,129,76,20,70,79,151,90,118,253,70,41,1,
198,98,145,230,177,37,199,68,206,102,46,96,239,199,45,175,38,71,38,112,241,198,46,216,90,167,86,65,70,173,51,70,147,176,38,140,81,198,87,26,6,
17,130,168,4,97,238,196,110,158,195,213,255,251,50,196,255,131,199,180,39,26,14,255,130,64,250,133,99,1,223,244,72,255,255,87,255,255,255,255,247,255,
255,223,254,255,82,98,10,106,41,153,113,201,186,170,170,170,170,170,170,170,170,170,170,49,224,145,49,244,200,50,137,65,52,70,112,48,157,135,127,52,41,
250,15,52,13,7,89,48,140,194,42,51,18,212,205,162,195,108,32,78,27,16,53,153,48,28,73,79,167,86,122,245,38,53,128,166,118,19,6,207,169,39,
121,85,70,53,217,4,39,93,71,188,231,84,233,6,230,54,48,99,199,137,201,230,197,187,102,163,55,198,153,223,102,95,158,166,20,3,133,179,92,142,91,
249,44,182,113,255,251,48,196,255,131,199,184,39,26,14,255,130,65,16,133,34,193,223,244,72,127,255,245,255,255,255,255,255,119,255,253,223,238,245,166,32,
166,162,153,151,28,155,213,85,85,85,85,85,85,85,85,85,49,228,144,49,224,203,50,109,70,52,2,123,48,148,199,158,51,241,186,248,51,214,71,120,48,
131,130,55,50,107,8,206,129,243,111,157,142,33,1,53,177,28,28,74,79,151,154,118,253,66,71,33,158,100,73,180,201,145,223,244,41,141,168,61,129,216,
163,212,17,214,128,62,65,141,186,24,9,226,210,33,176,142,225,167,46,41,164,24,49,150,71,193,132,160,249,112,23,59,176,255,203,236,61,255,251,50,196,
255,131,199,128,37,26,14,255,130,65,17,133,34,193,223,244,72,95,255,245,127,255,255,255,255,127,255,253,255,239,245,38,32,166,162,153,151,28,155,170,170,
170,170,170,170,170,170,170,170,49,216,145,49,212,204,50,73,75,51,198,132,48,139,135,187,51,183,123,209,51,157,7,151,48,122,66,68,49,163,60,207,160,
227,113,26,206,46,238,53,201,8,32,154,159,79,44,138,197,33,137,17,164,4,113,189,234,73,239,85,161,143,202,66,9,230,81,245,41,227,222,67,9,143,
212,26,81,241,116,121,182,241,25,171,16,113,167,60,25,152,41,41,133,1,48,36,1,83,6,182,254,70,39,249,255,251,50,196,255,131,198,44,37,28,14,
255,130,105,17,5,34,193,223,244,72,111,87,255,219,255,215,255,255,255,163,255,254,143,183,71,201,166,32,166,162,153,151,28,155,213,85,85,85,85,85,85,
85,49,204,144,49,184,207,50,37,78,51,122,141,48,130,71,212,51,122,188,150,51,97,199,178,48,112,2,81,48,203,104,13,13,55,73,128,227,77,243,94,
15,66,9,201,154,243,72,109,212,100,208,22,105,72,250,111,178,96,124,45,14,99,255,15,104,121,228,244,240,121,68,15,176,99,255,134,74,124,101,4,109,
116,72,106,76,38,105,39,28,101,130,80,97,40,82,12,0,149,189,172,59,113,185,192,255,251,50,196,255,131,198,44,37,28,14,255,130,105,19,5,34,129,
223,244,72,242,157,83,127,254,175,255,255,255,255,239,245,119,255,191,253,254,164,196,20,212,83,50,227,147,117,85,85,85,85,85,85,49,192,145,49,164,208,
49,249,83,51,62,150,48,120,7,237,51,59,253,73,51,36,7,203,48,101,194,90,6,57,74,35,102,236,42,156,125,152,107,241,176,97,69,51,158,89,61,
130,38,191,18,29,112,248,97,36,130,130,98,9,5,88,100,155,144,78,125,208,123,90,125,24,144,170,100,154,6,212,104,30,90,38,60,164,234,98,208,76,
198,39,40,54,97,122,38,4,192,100,13,0,116,208,101,255,251,48,196,255,131,198,44,37,28,14,255,130,105,15,5,34,129,223,244,72,110,196,57,47,176,
242,126,238,223,246,255,245,127,255,209,254,141,191,255,163,237,209,242,105,136,41,168,166,101,199,38,234,49,188,144,49,144,211,49,213,86,50,234,157,48,109,
200,2,50,249,189,234,50,228,71,224,48,90,130,101,0,60,0,210,131,121,146,14,64,185,54,0,188,56,164,153,175,52,154,217,99,100,13,206,202,101,48,
148,1,32,49,7,66,117,50,83,7,122,63,13,120,136,62,175,135,174,50,81,67,59,52,12,44,3,29,162,114,49,85,38,179,17,228,38,48,170,21,195,
2,16,51,10,0,50,105,255,251,50,196,255,131,198,44,37,28,14,255,130,105,27,5,98,65,223,244,72,178,135,110,55,57,124,225,13,159,102,159,179,255,
254,239,255,250,52,253,154,127,211,254,149,246,50,228,196,20,212,90,170,49,176,143,49,124,210,49,169,91,50,166,162,48,99,8,23,50,181,126,123,50,161,
7,245,48,79,66,110,48,251,236,211,160,243,123,15,78,74,166,54,24,160,56,162,156,79,44,158,193,19,104,146,14,212,74,48,149,192,255,49,9,130,56,
50,88,70,201,63,45,51,62,207,71,1,50,85,3,10,52,11,19,29,18,115,49,64,38,227,16,84,47,48,151,22,19,1,160,52,11,128,58,104,255,251,
50,196,255,131,198,28,37,28,14,255,130,105,34,133,34,65,223,244,72,52,183,98,49,63,122,221,75,246,232,251,127,250,254,255,254,143,244,104,233,255,209,
254,143,147,76,65,77,69,170,170,170,49,164,142,49,96,213,49,133,92,50,82,169,48,87,200,40,50,109,190,246,50,91,72,6,48,67,2,121,49,196,16,
212,65,227,125,139,142,80,147,54,32,140,72,172,156,47,116,154,216,90,163,109,22,78,230,49,48,151,0,220,49,11,193,251,50,92,6,14,63,73,109,138,
62,234,6,76,50,88,66,215,52,8,41,227,28,66,112,49,39,51,14,132,54,48,130,22,35,1,80,53,16,0,50,255,251,50,196,255,131,198,12,37,28,
14,255,130,105,60,5,98,1,207,248,16,123,180,135,110,95,57,126,207,246,127,179,255,254,157,31,255,244,255,167,253,63,233,87,177,49,5,53,20,204,184,
228,222,49,144,141,49,76,212,49,81,95,49,254,174,48,75,136,55,50,34,255,99,50,17,136,23,48,54,66,128,50,140,60,213,98,211,126,8,78,86,124,
54,56,104,88,170,156,79,108,158,193,19,113,154,14,240,16,48,152,192,185,49,13,1,184,50,95,197,73,63,96,167,161,63,1,69,143,50,90,130,162,52,
5,40,211,27,146,109,49,20,39,67,12,180,61,48,109,22,83,0,224,52,17,128,74,134,255,251,48,196,255,131,198,16,37,28,14,255,130,105,68,5,98,
1,207,248,16,52,183,98,89,63,123,171,246,117,255,175,253,157,159,255,255,251,170,215,221,254,239,247,122,211,16,83,81,106,170,170,170,49,140,140,49,48,
213,49,37,96,49,162,179,48,63,72,66,49,211,63,186,49,196,72,34,48,40,130,135,51,52,88,214,3,163,128,132,142,88,103,54,48,76,104,172,158,47,
116,154,216,90,163,117,29,202,95,102,19,48,18,6,33,216,46,102,76,80,143,71,238,140,226,112,152,198,75,136,77,102,127,196,240,99,88,77,6,31,164,
238,97,84,136,70,10,194,204,96,14,6,162,128,16,255,251,50,196,255,131,198,48,37,28,14,255,130,105,62,5,98,1,207,248,16,161,237,193,219,151,206,
95,226,187,125,95,234,255,127,255,255,255,239,255,127,251,255,222,222,164,196,20,212,90,170,170,170,49,64,119,48,228,182,48,193,51,49,22,94,48,42,135,
71,49,79,120,49,49,67,135,21,66,58,51,91,228,211,163,176,55,4,224,164,3,86,129,7,136,170,185,242,163,176,68,222,104,67,193,4,76,38,176,25,
204,67,224,74,12,153,48,230,207,224,166,167,207,200,112,252,76,151,64,140,12,254,73,148,198,124,153,76,57,9,216,194,45,17,204,15,197,164,0,6,195,
32,18,162,141,205,255,251,50,196,255,131,198,80,37,28,14,255,130,97,53,5,98,1,207,248,16,216,150,79,222,183,221,219,254,223,254,191,191,255,163,253,
26,85,110,143,244,127,163,237,76,65,77,69,51,46,57,55,170,49,52,116,48,200,183,48,157,52,48,178,97,48,30,71,76,48,254,184,94,48,244,199,50,
48,4,130,63,51,212,0,212,4,65,238,49,193,133,96,42,201,17,25,90,95,57,203,101,141,244,147,60,56,184,194,108,0,216,196,65,3,92,201,152,10,
160,254,51,76,224,252,172,12,40,201,117,7,212,207,192,147,140,100,9,128,195,52,157,204,25,145,32,192,136,90,130,160,110,64,1,10,166,220,31,255,251,
50,196,255,131,198,48,37,28,14,255,130,105,59,5,162,1,207,248,16,121,124,229,254,255,223,234,238,255,253,251,191,223,254,255,87,127,251,255,222,206,89,
49,5,53,20,204,184,228,222,170,49,32,115,48,180,182,48,105,53,48,86,96,48,15,7,81,48,164,120,125,48,155,135,57,48,6,2,68,52,92,28,212,
228,240,142,65,194,66,1,149,162,98,42,181,62,83,246,8,156,5,64,120,162,88,56,77,243,17,8,7,195,38,108,25,83,249,40,170,147,243,12,32,211,
37,208,27,67,62,114,57,49,129,37,179,11,2,118,48,65,68,179,0,49,107,24,3,98,168,4,170,131,119,134,37,255,251,48,196,255,131,198,80,37,28,
14,255,130,97,52,5,162,1,207,248,16,148,119,158,79,87,250,62,223,255,251,52,253,223,233,209,167,232,255,71,250,62,212,196,20,212,83,50,227,147,122,
170,49,28,112,48,152,183,48,53,52,11,76,99,35,169,24,25,156,69,24,21,227,157,24,11,33,35,154,106,28,106,162,193,185,192,226,225,17,234,201,65,
25,70,31,57,5,178,199,8,86,158,60,196,97,56,0,66,98,33,128,10,100,205,0,60,127,40,133,210,126,100,1,176,100,184,130,230,6,247,17,16,25,
114,74,64,98,93,58,129,129,40,148,2,229,168,26,3,112,152,8,14,248,180,16,50,255,251,50,196,255,131,198,24,37,30,14,255,130,105,57,5,98,1,
207,248,16,124,168,127,87,255,255,255,255,83,127,255,87,255,255,255,255,255,255,246,251,253,189,95,191,255,252,255,253,237,229,147,42,52,38,243,31,180,2,
2,106,0,9,136,192,55,29,76,193,136,226,28,193,145,28,244,192,142,9,40,213,113,83,87,152,205,204,20,56,72,20,122,182,86,34,81,151,178,126,144,
137,195,215,7,144,61,152,78,96,41,24,136,64,46,153,51,32,179,31,200,134,192,31,151,96,104,25,45,0,149,25,233,144,89,139,25,38,152,60,19,144,
1,18,76,6,5,172,46,6,196,0,18,172,205,222,24,150,255,251,50,196,255,131,198,8,37,30,14,255,130,105,58,5,162,1,207,248,16,79,222,121,62,
173,54,255,183,250,255,255,255,255,71,250,63,209,254,143,181,49,5,53,20,204,184,228,222,170,170,170,170,48,252,108,48,96,181,29,77,12,27,152,204,7,
33,212,12,49,222,29,12,49,129,206,140,12,16,147,77,113,26,53,145,168,221,34,19,132,8,3,4,196,117,104,123,228,22,203,28,81,134,121,84,129,132,
228,4,9,136,130,5,225,147,36,20,9,252,78,172,217,249,56,16,41,146,190,6,248,27,196,62,0,101,65,34,1,133,148,226,6,12,98,48,24,53,45,
64,8,13,193,48,16,29,81,255,251,48,196,255,131,198,4,37,30,14,255,130,105,53,133,98,1,207,248,16,120,64,201,242,209,246,219,233,255,111,255,255,
87,255,255,255,255,103,255,255,255,255,255,191,255,253,255,255,231,254,175,242,213,48,232,107,48,68,178,11,166,102,25,76,6,5,56,233,166,35,183,10,102,
35,56,231,38,7,96,73,198,199,143,154,220,230,110,129,97,194,71,32,42,217,17,17,90,222,201,29,33,19,4,108,12,227,6,88,10,115,9,196,10,131,
16,240,17,19,38,44,55,131,247,217,204,67,241,188,48,99,37,72,8,131,59,145,215,49,65,35,179,3,66,108,48,90,68,83,4,225,105,48,5,3,97,
255,251,50,196,255,131,197,204,37,30,14,255,130,105,95,172,34,1,207,216,16,64,9,85,38,199,16,4,13,29,171,253,191,182,191,255,245,255,255,255,255,
239,251,255,255,219,255,255,251,122,254,223,255,241,223,179,119,173,49,12,122,48,48,205,48,41,96,49,94,183,48,61,136,76,49,159,127,236,49,152,8,54,
48,80,66,165,55,181,64,219,9,3,135,145,78,96,92,54,48,40,120,174,158,15,60,82,95,92,137,199,155,39,153,93,24,78,0,103,152,135,32,174,25,
48,2,44,159,182,177,172,159,133,193,246,153,40,160,14,152,117,0,221,24,37,193,25,24,1,161,52,152,15,226,31,1,153,108,255,251,50,196,255,131,197,
244,37,30,13,255,128,169,48,133,98,1,207,248,16,192,96,193,168,17,4,6,162,46,136,121,92,180,127,183,222,191,190,175,223,255,87,255,255,255,255,254,
223,255,247,255,255,254,255,253,255,255,231,255,255,52,48,240,121,48,12,202,48,109,93,49,186,178,48,74,200,69,49,241,191,161,49,232,200,47,48,91,130,
166,56,45,92,219,169,179,135,20,14,94,117,54,56,76,104,168,158,111,36,94,89,83,58,204,18,80,57,12,25,128,51,76,38,240,60,12,67,32,105,76,
151,49,74,143,214,42,95,143,189,209,48,140,147,32,17,204,57,144,103,204,17,176,138,64,161,49,24,255,251,50,196,255,131,198,4,37,30,14,255,130,105,
97,44,34,1,207,216,16,20,2,28,153,234,202,97,49,160,128,18,161,207,76,64,16,52,115,255,82,127,125,127,111,253,127,255,255,255,255,255,255,255,255,
254,141,255,175,237,255,255,29,255,249,90,48,228,116,6,25,38,20,213,230,10,193,7,6,71,239,232,70,70,129,4,134,12,216,84,167,20,173,27,121,68,
112,242,233,203,17,6,196,13,11,21,211,129,231,138,75,235,225,81,130,80,7,105,131,50,7,1,132,212,8,153,136,90,15,49,146,196,47,137,249,251,122,
137,246,240,44,89,146,58,5,65,156,64,193,24,132,16,225,129,255,251,48,196,255,3,198,16,37,30,14,255,130,105,105,44,34,1,255,20,216,81,46,152,
96,161,145,132,136,177,24,12,1,168,92,2,20,53,234,137,219,162,181,207,247,254,218,126,255,250,55,255,245,254,223,255,255,254,255,255,255,239,255,167,239,
255,255,31,255,243,85,48,200,115,29,49,140,55,86,76,152,170,140,24,114,10,204,162,47,180,204,158,242,5,204,28,64,169,14,67,95,55,26,172,225,198,
99,149,167,205,134,35,18,42,39,27,201,23,150,84,11,90,96,150,129,236,96,205,1,226,97,52,130,100,98,17,4,78,100,167,141,88,126,67,105,180,125,
130,140,144,100,131,1,246,102,238,255,251,50,196,253,3,198,84,39,28,14,255,130,105,101,226,1,207,212,32,44,102,30,164,34,96,158,74,198,27,136,82,
97,68,44,38,3,224,104,20,0,116,246,120,98,0,129,163,159,250,183,254,191,183,254,191,191,255,255,255,191,239,255,255,255,247,251,127,255,219,255,254,59,
255,244,82,48,180,110,17,152,102,33,42,134,86,212,166,13,145,3,6,89,239,201,198,88,1,0,198,15,104,84,103,46,177,27,153,100,112,211,137,202,22,
70,192,20,9,20,211,129,231,138,75,235,132,108,255,255,255,255,255,255,255,255,255,255,255,176,104,45,186,131,30,12,76,182,48,52,129,28,225,41,3,9,
184,255,251,50,196,251,3,198,104,41,28,14,255,130,97,97,44,34,1,254,21,72,30,211,65,28,252,83,63,112,29,51,9,100,4,35,107,16,140,76,120,
48,66,52,197,240,163,14,146,145,53,246,66,107,50,143,223,178,107,207,161,83,202,201,63,100,180,165,213,48,152,107,2,24,6,39,170,38,96,83,198,14,
233,0,230,98,87,183,102,96,72,254,166,16,144,83,199,59,179,155,165,118,112,195,225,201,216,166,191,23,135,20,19,61,228,139,203,42,103,89,130,106,8,
65,131,48,8,153,132,190,11,113,136,28,20,233,146,66,64,97,246,205,249,193,243,210,61,81,145,160,12,89,154,120,145,152,100,143,255,251,50,196,249,3,
198,84,41,28,14,255,130,97,103,226,1,255,8,224,201,132,105,36,24,138,32,169,134,64,172,152,21,129,144,32,1,212,169,209,152,20,6,21,255,86,255,
255,255,245,255,253,63,255,255,255,255,255,255,255,183,255,253,191,255,227,191,244,244,42,48,140,102,48,28,189,49,105,76,51,78,153,48,128,135,240,51,83,
125,18,51,64,135,224,48,141,194,155,58,53,160,221,76,35,133,161,206,68,214,53,224,216,48,158,153,142,188,82,95,95,10,191,255,255,255,255,255,255,255,
255,255,255,234,52,48,237,53,140,250,56,49,89,62,14,120,49,250,7,159,60,227,251,201,60,145,7,255,251,48,196,246,131,198,92,39,28,14,255,130,97,
104,44,34,1,255,20,216,75,49,231,193,144,59,64,220,50,97,170,50,65,247,52,31,134,50,237,40,48,152,41,4,128,74,218,251,80,223,189,223,74,255,
254,207,254,143,255,223,255,255,233,255,79,255,232,48,104,99,48,64,184,49,157,73,51,146,144,48,138,199,217,51,145,60,91,51,125,199,203,48,150,130,150,
58,157,180,221,172,147,132,35,142,62,233,53,216,244,48,152,164,221,72,188,178,147,58,205,15,60,141,96,66,78,7,91,143,118,169,204,124,242,10,143,46,
175,249,143,26,49,245,140,120,0,113,206,189,47,76,133,103,204,169,123,255,251,50,196,243,130,71,216,39,28,14,255,130,64,254,133,36,181,207,240,76,141,
28,222,204,202,73,76,45,9,129,0,10,183,62,183,47,90,189,149,251,191,254,191,255,255,255,255,255,247,127,187,254,138,48,84,94,48,108,181,49,193,66,
51,214,135,48,147,135,190,51,205,123,142,51,183,135,178,48,159,66,145,58,245,184,221,204,227,131,166,78,52,248,53,177,8,32,158,159,14,188,82,95,95,
10,191,255,255,255,255,255,255,255,255,255,255,234,51,176,215,52,196,240,54,249,83,59,246,120,49,175,135,159,59,4,251,147,58,189,135,85,49,157,193,186,
57,64,132,49,113,92,50,145,167,52,39,0,255,251,50,196,248,3,198,84,41,28,14,255,130,97,94,44,34,1,255,20,216,50,236,248,48,152,31,46,19,
13,134,174,246,200,115,223,255,255,255,255,255,255,255,251,255,222,152,130,154,139,85,85,85,48,56,91,48,136,176,49,237,63,52,18,126,48,156,199,163,52,
6,186,179,51,239,199,151,48,167,2,138,59,77,196,221,237,115,130,40,14,47,9,53,169,28,28,72,79,183,82,47,44,164,206,179,59,205,195,75,143,179,
110,86,99,188,41,243,26,140,129,3,173,155,238,195,169,60,124,99,25,96,30,115,143,70,83,18,85,19,45,217,227,70,175,51,49,143,83,10,193,194,216,
176,232,102,231,45,255,251,50,196,246,131,199,224,41,28,14,255,130,65,24,5,98,65,223,244,72,6,239,221,255,244,127,255,255,255,255,255,187,253,201,136,
41,168,166,101,199,38,234,170,170,170,170,170,170,170,170,170,170,48,28,84,48,172,173,50,17,56,52,86,115,48,165,7,132,52,62,121,194,52,37,135,122,
48,175,66,133,59,149,192,222,13,195,128,170,78,37,24,53,129,48,28,75,79,135,94,41,47,167,194,175,255,255,255,255,255,255,255,255,255,255,250,140,206,
48,205,3,56,141,120,82,78,135,154,140,91,97,220,78,87,126,132,78,72,33,204,76,87,48,115,13,226,13,12,40,70,12,172,88,77,5,162,12,255,251,
48,196,248,3,198,104,41,28,14,255,130,97,21,5,162,65,223,244,72,181,51,140,36,5,80,12,214,97,170,189,13,250,127,255,255,255,255,255,255,255,79,
250,83,16,83,81,106,170,170,170,0,10,38,25,20,198,71,166,102,145,77,6,21,168,236,102,142,103,24,102,139,40,235,102,22,208,79,135,125,185,155,197,
194,111,229,129,195,229,38,173,41,130,136,137,246,234,67,242,202,76,235,51,60,198,52,0,235,53,205,88,57,234,137,49,102,199,204,57,50,60,200,56,246,
71,140,49,85,1,239,55,60,19,48,77,13,50,245,88,52,74,125,50,248,203,48,164,20,47,11,58,134,114,229,174,255,251,50,196,255,3,199,224,41,28,
14,255,130,65,3,133,34,129,223,244,72,122,63,255,255,255,255,255,255,255,71,250,19,16,83,81,76,203,142,77,234,170,170,170,170,170,170,170,170,170,170,
170,170,6,139,70,35,151,166,88,6,176,214,166,25,225,8,134,169,159,237,198,165,177,7,134,27,56,90,39,190,213,28,90,20,114,54,185,204,44,134,196,
51,0,138,233,32,227,195,145,186,112,205,159,255,246,127,255,255,255,254,159,255,255,255,246,25,156,101,153,254,121,26,216,179,156,219,83,24,175,132,19,156,
129,255,178,156,100,67,243,152,166,161,8,13,111,33,68,0,204,165,60,210,25,184,204,255,251,50,196,255,131,198,112,41,28,14,255,130,97,7,133,34,129,
223,244,72,115,24,194,160,76,188,76,230,53,87,127,255,255,255,255,255,255,255,255,165,49,5,53,20,204,184,228,222,170,24,21,76,78,45,140,187,84,77,
112,169,140,54,18,6,205,97,47,136,205,89,18,4,204,56,96,177,143,147,171,56,188,68,227,205,227,149,221,77,130,109,49,64,1,28,220,72,126,49,72,
14,91,255,255,255,255,255,255,255,255,255,255,255,105,150,101,145,155,6,201,166,234,33,194,19,89,137,102,59,113,189,241,206,209,188,90,57,177,136,224,15,
89,174,32,144,88,211,50,237,26,52,26,19,50,255,251,48,196,255,131,199,232,41,28,14,255,130,65,0,4,226,193,223,244,72,200,167,48,148,12,69,22,
189,25,10,135,63,255,255,255,255,255,255,255,250,63,208,152,130,154,138,102,92,114,111,85,85,28,19,12,87,44,76,194,82,13,127,165,204,56,1,251,13,
110,159,48,13,102,1,249,140,58,80,174,207,165,168,56,180,88,227,46,115,146,97,13,116,114,49,56,5,28,120,114,55,78,25,179,255,255,255,255,255,255,
255,255,255,255,254,195,44,139,83,53,77,227,75,149,19,129,104,35,18,88,123,115,121,7,191,115,117,232,119,243,17,76,32,99,87,131,19,3,76,99,49,
145,51,68,96,255,251,50,196,255,131,198,96,41,28,14,255,130,97,1,5,98,193,223,244,72,99,46,202,35,9,128,180,82,107,177,160,88,55,233,255,255,
255,255,255,255,255,255,254,148,196,20,212,83,50,227,147,117,10,136,230,46,21,70,102,167,230,198,80,198,29,8,247,102,189,183,105,166,185,88,247,38,30,
0,85,199,219,212,156,94,54,113,71,113,199,114,102,183,59,152,144,4,149,238,36,63,24,164,15,91,255,255,111,255,255,255,255,255,255,255,255,246,153,102,
91,25,164,114,154,82,174,27,237,76,152,142,227,253,27,175,222,254,27,151,163,226,24,134,1,16,157,44,152,97,229,217,180,225,7,28,252,155,255,251,50,
196,255,131,200,4,39,26,14,255,130,64,250,133,98,193,223,244,72,9,58,98,144,82,10,181,232,200,84,57,232,255,255,255,255,255,255,255,255,254,132,196,
20,212,83,50,227,147,117,85,85,48,0,64,49,148,163,51,81,54,54,110,117,48,239,135,136,54,30,249,194,53,250,7,134,48,247,66,161,63,22,152,226,
210,3,135,189,206,41,160,53,129,240,196,160,52,172,107,240,228,110,156,51,103,255,255,255,255,255,255,255,255,255,255,253,134,88,23,102,103,157,134,144,45,
38,244,213,198,34,177,7,166,229,159,253,102,223,161,0,230,32,120,71,71,54,50,152,197,92,109,200,9,201,253,6,255,251,50,196,255,131,199,244,39,26,
14,255,130,64,249,4,99,1,223,244,72,201,76,24,168,18,130,205,118,92,18,5,189,63,255,255,255,255,255,255,255,255,210,152,130,154,138,102,92,114,110,
170,170,48,68,69,49,248,180,52,5,91,55,154,188,49,26,72,91,55,46,191,245,55,3,200,91,49,34,2,242,56,197,227,52,253,81,52,201,36,52,221,
237,51,28,151,48,168,8,65,118,88,255,198,41,45,156,95,255,253,127,255,255,255,255,221,255,255,255,253,102,76,148,6,87,26,38,121,168,6,206,77,102,
29,120,237,198,195,167,55,70,190,136,232,6,27,112,64,230,253,52,24,209,22,108,150,161,255,251,48,196,255,131,199,240,39,26,14,255,130,64,252,4,99,
1,223,244,72,193,179,166,178,63,152,148,8,149,174,52,180,120,115,209,255,255,255,255,255,255,255,255,253,9,136,41,168,181,85,85,85,48,96,60,50,28,
173,52,33,78,55,222,167,49,34,8,26,55,97,254,8,55,53,8,28,49,41,66,227,56,225,224,52,241,84,52,173,45,52,177,252,51,0,156,48,164,11,
65,70,190,254,70,233,236,61,95,255,245,127,255,255,255,255,127,255,255,255,245,25,44,81,153,86,106,25,212,165,155,31,62,24,113,195,209,154,245,253,162,
154,226,3,186,152,105,161,13,27,160,246,100,51,241,180,25,255,251,50,196,255,131,200,4,39,26,14,255,130,64,245,132,99,1,223,240,72,167,17,199,26,
228,240,98,96,26,87,56,178,225,129,191,79,255,255,255,255,255,255,255,255,244,166,32,166,162,170,170,170,48,140,53,50,48,164,52,77,65,56,10,144,49,
41,199,217,55,146,60,3,55,100,71,221,49,47,130,208,56,253,221,52,237,89,52,137,50,52,142,9,50,228,161,48,152,10,69,54,112,255,198,41,45,185,
127,255,245,255,255,255,255,255,119,255,255,255,245,153,46,82,25,76,108,153,202,169,27,1,70,152,109,227,234,26,220,30,92,26,200,227,211,24,101,65,23,
155,85,24,100,227,153,182,88,71,255,251,50,196,255,131,200,12,39,26,14,255,130,64,246,4,99,1,223,240,72,24,192,154,240,234,98,112,18,56,184,210,
219,226,111,187,255,255,255,255,255,255,255,255,251,147,16,83,81,106,170,170,170,48,168,42,50,84,155,52,105,52,56,70,121,49,48,135,146,55,191,249,232,
55,144,135,152,49,54,66,191,57,17,216,52,225,92,52,117,59,52,98,22,50,192,164,48,140,13,69,6,118,254,70,233,236,31,87,255,253,95,255,255,255,
255,223,255,255,127,255,212,100,161,78,101,25,184,102,226,182,107,141,56,97,166,16,10,107,5,252,54,106,186,15,174,97,131,132,132,108,4,249,150,204,198,
226,92,255,251,50,196,255,131,200,108,41,24,14,255,162,64,244,4,99,65,223,240,72,156,126,224,108,51,113,138,0,40,228,226,203,175,8,127,255,255,255,
255,255,255,255,255,254,244,196,20,212,90,170,170,170,48,252,208,168,53,61,85,57,170,184,49,99,72,79,57,5,191,117,56,206,200,89,49,104,131,12,58,
134,25,53,149,149,52,249,112,52,222,115,51,20,197,48,168,18,47,26,236,114,223,202,75,110,95,250,255,215,255,255,255,255,253,223,255,247,127,253,102,73,
148,198,79,28,38,105,172,70,176,85,102,25,89,6,6,169,71,237,6,164,217,0,70,23,16,74,166,171,87,25,152,178,110,149,255,251,48,196,255,131,200,
100,41,24,14,255,162,64,244,4,99,65,223,240,72,113,201,172,38,198,52,128,138,201,34,235,69,111,137,190,228,196,20,212,83,50,227,147,122,170,170,170,
170,170,170,170,170,49,24,30,50,244,159,53,89,68,57,230,157,49,106,135,248,57,51,252,216,56,251,136,4,49,111,66,247,58,154,18,53,129,152,52,213,
121,52,170,126,50,232,202,48,156,21,64,35,15,118,35,116,246,30,175,255,250,191,255,255,255,255,191,255,254,255,247,250,140,124,36,76,131,49,12,174,78,
205,37,152,12,42,33,212,205,28,94,47,77,20,161,202,204,38,48,133,140,252,165,51,8,248,218,255,251,50,196,255,131,200,100,41,24,14,255,162,64,244,
132,163,65,223,240,72,8,211,130,201,13,94,84,5,17,83,233,213,158,189,74,98,10,106,41,153,113,201,189,85,85,85,85,85,85,85,85,85,49,60,19,
51,8,146,53,125,51,58,18,126,49,113,71,159,57,95,58,33,57,38,71,173,49,117,2,220,58,174,13,53,117,155,52,161,126,52,118,139,50,196,207,48,
144,20,64,59,12,118,225,138,75,110,95,255,253,127,255,255,255,255,221,255,255,119,255,214,99,217,32,99,241,146,101,58,124,104,164,218,97,65,142,232,104,
119,115,124,104,61,142,156,97,31,4,74,102,181,129,154,6,38,215,65,255,251,50,196,255,131,200,124,41,24,14,255,162,64,242,132,163,65,223,240,72,28,
42,42,107,34,120,40,148,159,46,180,237,250,147,16,83,81,76,203,142,77,213,85,85,85,85,85,85,85,85,85,85,49,160,10,51,172,157,54,113,78,59,
190,183,49,172,136,70,58,219,254,254,58,153,8,90,49,175,195,60,74,80,54,49,218,53,45,189,52,226,246,51,8,242,48,164,29,45,130,195,185,15,252,
190,192,121,94,223,255,87,255,255,255,255,247,255,255,223,254,255,81,143,4,137,143,102,81,147,202,41,160,243,177,132,188,60,169,160,39,213,105,159,68,59,
121,132,54,17,145,149,23,230,115,17,27,255,251,50,196,255,131,200,140,41,22,14,255,162,64,204,132,163,65,223,240,76,112,242,112,248,33,173,73,0,226,
74,125,58,179,214,41,76,65,77,69,51,46,57,55,85,85,85,85,85,85,85,85,85,7,28,102,120,17,198,210,167,103,125,82,6,54,104,250,231,96,199,
116,231,88,88,253,230,54,176,97,71,138,201,38,195,187,166,159,56,70,147,224,102,91,159,38,18,3,133,195,92,142,219,249,44,182,101,127,255,245,255,255,
255,255,255,119,255,253,223,255,89,142,228,129,142,134,105,146,170,65,158,212,9,132,118,61,145,158,85,220,81,157,130,60,97,131,232,18,9,143,89,70,122,
9,155,140,220,255,251,48,196,255,131,200,136,41,22,14,255,162,64,197,132,163,129,223,240,77,113,71,169,174,8,161,4,228,249,121,167,109,212,152,130,154,
138,102,92,114,110,170,170,170,170,170,170,170,170,170,170,170,30,71,77,31,37,77,236,84,143,119,177,76,125,194,27,15,47,31,255,143,27,98,35,12,126,
80,213,207,136,164,141,184,136,141,95,131,77,64,223,140,196,72,140,9,193,0,2,153,181,135,110,55,44,191,103,255,253,159,253,95,119,255,255,167,255,254,
159,244,253,134,58,18,38,56,153,198,70,41,230,114,209,70,16,160,249,166,113,239,138,230,110,176,245,38,14,104,73,134,34,107,154,12,255,251,50,196,255,
131,200,124,41,22,14,255,162,64,197,132,163,129,223,240,77,4,110,99,41,198,92,134,187,31,4,19,83,57,229,145,88,8,253,233,136,41,168,166,101,199,
38,245,85,85,85,85,85,50,92,4,52,152,130,55,213,57,62,10,150,49,253,199,229,60,229,59,227,60,149,200,7,49,254,3,48,62,46,135,54,206,37,
53,58,16,52,175,139,50,221,39,48,144,38,6,128,106,216,214,223,200,196,249,197,255,255,215,255,255,87,255,255,221,235,255,247,127,253,102,57,146,6,53,
26,38,65,170,70,106,82,102,15,120,252,198,106,23,161,198,103,40,248,70,13,32,74,230,5,113,13,69,77,255,251,50,196,255,131,200,180,41,20,14,255,
162,64,197,132,163,129,223,240,77,218,88,56,227,76,215,195,144,194,146,102,188,210,107,117,38,32,166,162,153,151,28,155,170,170,170,170,170,170,170,170,170,
53,208,124,235,104,51,9,24,20,163,16,60,44,19,36,184,133,227,237,183,245,99,231,240,136,163,36,180,55,147,64,226,214,49,232,39,67,22,242,101,49,
64,65,131,12,33,88,48,41,3,48,64,3,37,91,40,118,227,115,151,220,204,87,162,207,246,127,245,253,191,253,63,233,255,79,250,127,211,242,6,55,18,
38,51,154,70,60,42,230,97,211,70,14,32,255,166,98,15,182,230,95,48,251,102,255,251,50,196,255,131,200,116,41,20,14,255,162,64,197,4,163,129,223,
240,77,11,200,76,66,23,104,68,156,222,4,211,144,176,13,130,48,12,40,166,115,203,39,176,69,49,5,53,20,204,184,228,222,54,40,192,236,70,195,9,
52,18,179,16,96,40,99,37,28,123,83,240,19,164,83,234,76,126,115,37,0,52,163,64,242,199,49,223,39,83,21,162,104,49,39,66,51,11,17,93,48,
34,3,32,104,3,166,131,35,18,251,221,217,235,238,245,255,179,255,255,255,247,127,255,221,254,239,89,141,164,113,140,6,153,141,234,193,149,213,9,131,54,
64,129,150,101,242,97,149,190,63,113,130,152,255,251,48,196,255,131,200,204,18,14,255,162,64,204,4,163,129,223,240,76,19,105,133,30,198,154,5,27,212,
128,114,69,105,176,133,97,197,36,225,121,164,214,243,165,49,5,53,22,170,170,170,54,113,12,237,37,83,9,80,16,163,16,140,36,211,37,104,112,67,242,
55,79,163,236,80,115,195,37,60,49,179,64,194,182,49,212,39,35,20,114,109,49,12,66,195,9,193,94,48,29,3,48,160,3,38,155,72,118,227,115,150,
220,205,139,211,102,159,179,250,250,191,209,246,127,163,78,141,154,127,211,254,159,135,12,106,35,204,91,53,12,98,87,76,155,169,140,22,226,8,204,161,159,
179,204,156,255,251,50,196,255,131,200,204,41,18,14,255,162,64,195,4,163,129,223,240,77,162,0,76,17,208,157,12,99,1,53,8,108,223,3,83,147,166,
13,138,36,18,42,167,19,219,39,176,69,49,5,53,22,54,185,80,238,3,131,9,108,14,147,16,168,32,227,37,180,100,211,244,10,247,51,238,28,104,147,
37,112,46,131,64,178,165,49,201,39,19,19,34,112,48,241,67,83,8,145,99,48,22,3,64,184,3,167,163,75,118,35,19,247,158,119,22,232,183,253,191,
255,247,255,255,211,163,79,209,254,143,183,71,218,99,57,28,98,161,170,98,202,188,100,53,90,96,159,144,100,100,120,126,128,100,85,144,32,255,251,50,196,
255,131,201,236,16,14,127,192,128,193,132,163,129,223,240,77,96,117,4,250,100,136,81,169,133,6,253,19,28,161,10,108,64,232,177,89,56,94,233,53,178,
201,136,41,168,181,85,85,55,1,140,238,225,211,9,128,12,67,16,204,28,243,37,232,88,195,245,158,154,35,239,152,92,227,37,156,64,98,146,49,188,38,
227,17,210,115,48,212,67,163,7,65,100,48,17,3,81,0,3,39,187,72,118,229,243,151,231,182,116,89,254,207,233,255,183,255,167,253,63,102,159,244,255,
254,120,198,34,52,196,243,80,196,197,132,199,26,192,193,14,32,252,199,185,254,124,199,122,32,124,192,255,251,48,196,255,131,201,180,45,16,14,127,192,128,
200,132,227,129,223,240,77,181,10,16,204,49,83,87,141,206,0,23,57,89,176,216,225,65,98,170,121,61,178,123,24,84,152,130,154,138,170,170,170,55,73,
200,37,232,97,50,129,62,98,28,3,20,100,195,137,130,126,220,70,254,126,27,138,22,100,183,4,248,104,2,80,38,54,36,214,98,8,78,134,22,232,130,
96,190,44,230,1,0,104,42,1,42,24,210,221,137,100,253,233,221,170,211,111,251,127,255,255,254,143,244,127,163,253,31,110,143,180,198,18,40,196,99,84,
196,21,128,197,138,212,192,219,33,32,198,110,255,168,198,55,32,168,192,255,251,50,196,255,131,202,72,16,14,127,192,128,198,4,163,129,223,240,77,120,10,
52,206,145,195,90,16,142,6,6,57,97,92,217,0,209,162,178,120,189,210,11,101,147,16,83,81,106,170,170,170,48,60,0,129,48,96,64,4,48,154,0,
116,49,15,65,65,50,100,3,230,63,126,92,236,63,29,4,58,50,92,194,69,51,250,38,195,26,34,102,48,237,39,115,9,100,68,48,70,22,131,0,48,
55,24,0,133,23,110,14,216,28,16,123,76,222,139,253,244,255,255,163,127,255,255,255,255,219,255,255,255,255,191,255,253,255,255,227,255,111,103,81,137,131,
169,134,165,177,133,73,169,134,178,241,129,255,251,50,196,255,131,201,252,16,14,127,192,128,198,4,163,129,223,240,77,20,58,89,136,211,194,137,136,124,57,
137,128,86,17,241,157,95,230,161,33,137,113,78,14,50,53,104,0,136,138,173,79,148,253,130,53,55,202,56,240,130,83,9,180,4,147,17,0,15,35,38,
92,47,211,248,161,92,147,242,140,53,179,37,208,32,131,63,50,87,49,149,38,19,13,66,118,48,115,68,147,2,209,107,4,1,176,232,4,168,163,115,125,
37,147,247,158,27,197,151,162,221,31,111,245,245,255,167,255,254,141,10,183,71,250,62,221,31,105,137,99,145,133,197,185,131,233,161,131,147,9,128,166,58,
113,134,29,255,251,50,196,255,131,201,216,16,14,127,192,128,200,132,227,129,223,240,77,195,161,133,214,57,176,4,36,51,67,65,13,72,76,22,229,156,24,
50,14,172,147,17,149,165,243,156,182,89,49,5,53,55,242,108,241,36,35,9,184,1,3,17,12,9,211,38,104,31,99,249,20,219,67,242,248,38,67,37,
212,28,176,55,212,144,0,204,50,92,3,23,105,220,12,38,68,160,48,28,90,128,136,55,8,0,64,117,197,112,129,147,229,67,250,77,234,255,255,223,255,
87,255,255,255,255,111,255,255,255,255,253,255,255,239,255,255,63,255,123,122,140,70,28,204,41,45,140,16,77,76,1,152,140,0,225,212,255,251,48,196,255,
131,201,184,16,14,127,192,128,198,4,163,129,223,240,77,204,23,126,33,204,21,129,206,204,4,96,145,141,47,13,53,73,84,220,192,0,88,72,90,180,80,
69,81,151,202,126,193,21,56,58,160,241,133,179,9,196,0,163,17,8,3,35,38,116,11,83,249,64,51,211,243,36,20,147,37,192,24,131,62,18,37,115,
9,226,116,48,35,68,178,192,181,150,0,216,176,1,42,200,221,223,73,101,29,231,134,241,107,255,71,219,255,213,255,255,255,163,253,31,232,251,116,24,134,
56,24,68,90,152,6,154,8,102,51,0,120,117,35,3,143,136,163,3,200,115,195,1,252,255,251,50,196,255,131,203,85,97,16,15,248,166,192,195,4,163,
193,223,240,77,36,147,83,68,141,92,94,55,56,68,30,16,38,172,21,136,212,97,239,156,182,89,49,5,53,20,204,184,228,221,85,85,56,98,212,242,39,
35,9,200,4,51,17,12,3,99,38,104,15,115,249,44,166,243,243,0,4,115,37,172,20,80,55,172,132,128,203,50,78,3,16,105,204,37,18,128,192,121,
106,2,0,220,33,1,1,229,22,130,6,79,150,143,163,75,247,255,255,191,254,175,255,255,255,255,255,255,255,127,255,251,255,234,253,255,255,231,255,239,103,
85,6,31,13,230,13,150,130,36,212,193,41,136,192,95,29,76,255,251,50,196,253,131,202,52,16,14,127,192,128,188,132,163,193,223,240,77,194,158,225,244,
194,159,28,244,192,176,9,48,214,177,147,89,154,77,208,28,56,72,92,58,182,80,68,86,183,178,71,72,69,56,155,0,242,72,179,9,204,7,3,17,0,
9,243,38,92,34,131,248,201,48,163,242,164,26,99,37,136,15,131,60,177,249,49,87,36,115,6,34,112,48,32,68,147,2,193,107,4,129,176,224,4,171,
51,99,134,37,147,247,158,119,106,191,254,223,254,191,244,255,163,253,31,232,255,71,219,172,195,209,176,193,34,204,81,50,48,174,97,48,37,7,78,49,1,
248,94,48,255,7,56,48,55,194,255,251,50,196,255,131,203,9,97,16,14,126,192,128,193,4,163,193,223,240,77,79,54,20,112,214,199,3,116,138,78,16,
48,5,86,9,136,234,208,247,206,91,44,152,130,154,138,102,92,114,110,170,170,48,70,0,203,48,101,64,158,48,156,128,155,49,15,192,246,50,99,131,41,
63,130,90,117,63,32,2,181,50,85,192,167,51,188,29,227,20,98,62,48,65,38,243,4,212,68,48,71,22,131,0,32,55,25,0,133,81,108,16,216,56,
96,246,155,243,255,233,255,255,79,255,210,223,255,255,255,255,255,255,255,127,253,63,127,255,248,255,171,189,186,213,73,134,195,73,129,101,129,128,41,153,136,
82,241,255,251,48,196,255,3,201,132,16,14,127,192,128,190,132,163,193,223,240,77,129,142,58,73,138,145,193,153,138,106,57,169,130,16,18,113,180,100,102,
185,60,155,168,104,112,114,57,171,64,100,68,69,94,246,72,233,8,213,56,235,88,242,203,51,9,196,12,3,16,232,20,83,38,20,65,3,247,50,19,67,
241,20,58,35,37,32,4,67,58,241,197,49,53,35,83,1,162,106,48,114,68,19,5,225,105,48,11,3,65,16,4,168,179,101,136,78,81,222,123,178,139,
246,255,183,255,254,255,247,127,244,109,250,63,209,246,235,250,76,63,30,12,6,51,76,20,87,140,103,173,76,17,130,17,140,117,255,251,50,196,255,131,203,
13,97,16,14,126,192,128,193,132,163,193,223,240,77,191,239,12,115,130,12,12,22,16,169,206,1,84,54,210,88,225,228,211,151,27,13,140,16,26,167,131,
207,20,151,215,195,255,255,255,255,255,255,255,255,255,255,255,169,57,19,132,243,44,99,9,184,14,83,16,212,24,195,37,224,78,115,246,6,119,211,239,224,
71,211,36,228,1,227,14,120,26,131,4,136,34,162,160,76,166,4,168,135,64,103,91,48,24,64,106,3,193,1,168,139,162,30,87,45,31,66,255,191,254,
175,223,255,75,255,251,55,255,254,223,215,255,255,255,255,191,255,253,255,255,231,254,205,42,48,224,255,251,50,196,255,3,201,152,16,14,127,192,128,192,132,
163,193,223,240,77,119,2,153,6,18,171,166,62,86,6,10,89,7,166,68,183,236,166,67,105,4,230,12,96,84,135,15,172,155,125,62,112,226,193,203,80,
102,197,12,139,21,19,141,228,139,203,42,103,90,0,0,5,130,57,40,0,0,102,82,97,164,136,230,233,44,30,113,82,97,220,132,112,108,69,36,108,107,
247,132,28,97,206,0,78,7,93,71,129,150,217,96,18,226,3,27,104,64,196,135,240,13,2,10,68,10,128,131,250,49,133,66,217,239,245,161,191,82,181,
253,219,234,171,58,238,58,83,13,71,33,67,28,195,37,96,201,58,255,251,50,196,255,131,203,117,97,16,15,248,166,192,198,4,163,193,223,240,77,180,193,
120,32,184,201,195,251,232,201,144,32,104,193,183,10,148,227,149,227,113,42,14,30,99,57,98,88,216,129,225,98,186,112,60,241,73,125,124,63,255,255,255,
255,255,255,255,255,255,255,250,170,1,33,196,0,0,26,4,105,154,202,101,28,52,128,159,66,230,25,5,194,209,158,168,246,102,158,126,130,165,152,254,32,
96,30,24,158,25,176,232,24,109,6,153,111,211,25,14,153,24,44,21,133,192,36,181,110,209,59,119,175,223,151,225,251,20,144,52,129,5,207,34,143,119,
255,255,255,70,159,244,255,167,253,38,23,255,251,48,196,252,131,201,232,16,14,127,192,128,250,5,35,129,223,240,72,13,227,134,33,135,234,185,148,213,49,
131,74,64,249,149,193,243,233,149,78,64,105,131,188,21,17,202,236,102,229,88,156,48,220,114,149,89,176,196,226,69,4,227,121,34,242,202,153,215,0,0,
4,142,56,218,0,0,96,102,4,198,9,128,78,96,250,7,6,28,192,238,100,66,52,7,202,90,212,123,238,49,6,65,192,102,119,103,102,66,206,96,111,
6,69,206,98,135,169,125,12,133,66,147,37,184,64,144,124,134,253,158,175,86,163,82,12,59,66,201,171,179,107,90,97,94,243,37,186,220,131,10,70,192,
105,130,255,251,50,196,249,3,203,33,95,16,14,126,161,0,202,133,35,129,223,240,76,98,82,164,101,221,66,96,231,16,24,101,249,251,220,101,216,15,248,
97,3,133,66,115,107,33,185,151,7,13,60,156,153,124,108,1,96,113,77,51,30,120,164,190,184,71,255,255,255,255,255,255,255,255,255,255,255,177,0,0,
4,109,137,25,0,0,96,100,5,38,9,96,84,96,244,7,230,28,97,8,100,52,57,39,197,253,78,123,164,54,102,65,32,132,118,198,70,52,196,97,14,
230,87,200,99,39,137,123,13,3,2,210,217,227,183,59,107,27,183,161,255,32,205,75,157,78,231,209,142,182,195,28,121,39,114,70,17,255,251,50,196,247,
2,201,144,123,31,174,126,162,104,247,5,35,129,223,240,72,13,38,2,23,198,169,230,102,83,70,15,184,255,38,103,199,169,166,101,136,253,38,17,80,83,
135,67,180,155,173,126,112,164,17,201,90,38,191,26,134,20,19,61,212,139,203,41,2,214,170,52,52,232,53,136,247,56,61,78,62,26,105,49,252,71,112,
60,240,186,96,60,157,199,26,49,233,129,127,59,92,231,50,133,175,50,37,248,51,251,139,50,217,41,48,148,40,6,0,106,221,0,204,94,180,102,253,205,
255,255,255,191,211,223,255,255,255,187,253,223,255,188,193,209,144,192,242,236,198,37,40,205,250,76,194,28,255,251,48,196,245,130,202,76,18,238,255,162,64,
202,5,35,129,223,240,76,31,128,205,245,242,104,205,166,31,72,194,79,10,100,233,214,163,118,49,142,18,141,57,3,136,215,67,160,194,122,144,117,226,146,
250,248,85,255,255,255,255,255,255,255,255,255,255,255,85,52,56,241,53,133,4,56,33,105,61,238,152,49,245,135,253,60,200,254,141,60,118,7,169,49,226,
193,180,59,8,198,50,41,162,50,129,241,52,95,126,51,21,36,48,168,39,4,128,10,218,251,80,223,188,105,46,223,254,255,87,255,255,221,255,255,250,187,
255,223,255,111,73,130,194,249,130,197,177,141,170,41,157,212,81,132,134,255,251,50,196,246,130,202,16,123,39,175,108,71,48,249,4,227,129,223,240,72,62,
73,157,205,222,169,157,38,61,217,132,224,20,145,214,237,230,237,102,156,25,40,113,215,169,174,72,33,4,197,38,234,69,229,148,153,214,51,180,212,52,192,
237,55,5,76,60,2,109,49,177,199,120,59,18,58,110,58,203,71,44,49,160,1,171,57,92,143,49,141,97,50,125,168,52,11,3,50,216,251,48,148,30,
46,10,230,134,110,94,191,143,163,255,246,255,255,255,255,255,255,71,250,12,17,22,140,33,44,204,118,80,12,255,160,76,38,97,235,12,252,254,191,140,247,
65,232,12,41,48,163,78,201,110,55,115,72,255,251,50,196,243,2,201,172,121,39,175,108,71,48,207,4,227,129,223,240,76,224,169,243,140,65,13,104,70,
8,37,167,195,175,20,151,215,194,175,255,255,255,255,255,255,255,255,255,255,250,147,16,106,51,176,219,52,188,246,54,233,97,59,214,146,49,171,7,235,58,
232,253,211,58,162,7,161,49,152,193,214,57,16,110,49,57,84,50,193,161,52,86,248,51,12,246,48,160,29,45,146,229,134,174,246,207,111,211,255,255,255,
255,255,255,255,250,127,210,96,64,174,97,65,88,100,10,118,104,116,236,97,68,143,30,104,87,116,42,104,39,143,10,97,89,5,12,118,251,137,188,91,103,
2,83,28,86,42,255,251,50,196,246,3,200,216,41,18,14,255,162,64,251,133,35,129,223,240,72,107,50,88,56,144,159,110,164,94,89,73,157,127,255,255,
255,255,255,255,255,255,255,255,245,166,32,166,162,213,85,85,85,51,60,192,52,16,223,53,237,66,58,42,95,49,111,199,80,57,107,185,34,57,46,199,16,
49,95,1,193,55,164,65,48,189,29,50,165,98,51,250,141,50,192,209,48,148,20,64,58,134,117,203,92,244,127,254,223,255,255,255,255,255,255,244,24,6,
41,24,98,84,153,20,154,26,63,54,152,85,67,183,26,48,252,141,26,36,3,178,24,90,33,64,157,226,228,111,6,241,191,213,231,14,145,26,255,251,48,
196,247,3,200,244,41,18,14,255,162,64,205,5,35,129,223,240,76,184,160,10,35,167,195,175,14,75,233,240,171,255,255,255,255,255,255,255,255,255,255,254,
164,196,20,212,83,50,227,147,117,51,56,197,52,12,232,53,209,83,57,254,126,49,105,7,175,57,65,123,229,57,4,135,111,49,87,193,226,55,88,30,48,
97,16,50,217,91,52,62,128,50,236,204,48,152,21,47,19,57,134,170,244,55,233,255,255,255,255,255,255,255,253,63,233,2,11,102,33,23,198,86,171,102,
173,87,6,25,137,10,102,167,55,251,38,163,105,9,38,26,208,90,71,189,213,156,94,18,114,38,161,204,236,38,255,251,50,196,253,3,200,40,20,14,255,
162,64,252,5,35,129,223,240,72,199,51,128,138,137,38,211,33,248,197,32,90,223,255,251,127,255,255,255,255,255,255,255,255,181,49,5,53,21,85,85,85,
51,60,200,51,248,241,53,189,98,57,194,157,49,97,200,8,57,19,190,136,56,216,71,200,49,79,130,7,14,225,204,1,65,76,199,84,141,28,156,204,196,
50,76,5,11,194,206,163,33,192,231,163,255,255,255,255,255,255,255,244,127,160,70,24,150,92,153,108,169,26,215,85,152,106,132,20,26,185,63,73,26,169,
4,16,24,111,97,100,159,19,84,113,104,113,199,219,167,44,184,27,8,212,255,251,50,196,255,131,200,28,20,14,255,162,64,253,5,35,129,223,240,72,2,
41,163,131,143,14,70,233,193,59,63,255,255,255,255,255,255,255,255,255,255,236,76,65,77,69,51,46,57,55,85,85,50,200,177,51,100,214,52,225,65,56,
86,96,49,47,7,87,55,204,249,35,55,153,135,31,49,30,193,224,53,216,9,29,53,140,182,71,77,3,133,140,177,42,12,36,3,81,73,174,198,131,97,
191,255,255,255,255,255,255,255,255,255,73,84,79,49,72,178,51,5,75,53,234,156,48,221,199,251,53,168,189,57,53,135,71,247,48,230,130,190,62,126,172,
226,241,83,141,57,14,79,127,53,233,196,197,255,251,50,196,255,131,200,4,22,14,255,162,64,253,133,35,129,223,240,72,0,4,115,113,33,248,197,32,122,
223,255,251,127,255,255,255,255,71,255,255,255,251,83,16,83,81,76,203,142,77,213,85,50,204,180,51,88,221,52,205,76,56,34,123,49,40,71,158,55,159,
187,70,55,109,199,104,49,23,1,253,53,148,40,48,16,203,51,13,20,52,50,11,50,224,165,48,156,12,69,22,189,25,10,135,61,31,255,255,255,255,255,
255,255,255,208,32,18,12,91,200,80,141,137,163,76,57,97,243,13,119,62,242,141,110,129,242,12,59,112,172,207,173,168,56,180,96,226,238,211,143,99,141,
112,118,255,251,48,196,255,131,200,0,39,22,14,255,162,64,255,4,227,65,223,240,72,49,56,13,28,120,114,55,78,25,179,255,255,255,255,255,255,253,63,
255,255,250,126,196,196,20,212,83,50,227,147,117,50,200,183,51,76,226,52,169,89,55,238,144,49,32,135,229,55,112,125,83,55,63,7,175,49,15,66,22,
58,145,12,195,227,103,67,78,51,252,53,250,120,197,0,180,22,107,177,160,88,55,233,255,255,255,255,255,255,255,255,254,144,8,134,99,17,72,102,154,114,
108,180,244,97,218,143,54,108,29,116,146,107,213,143,50,97,234,5,76,125,253,57,197,227,231,16,122,28,103,58,107,51,217,255,251,50,196,255,131,199,216,
35,22,14,255,162,64,253,4,227,65,223,240,72,137,0,73,94,215,33,248,197,32,57,111,255,253,191,255,255,255,255,163,255,255,255,253,169,136,41,168,166,
101,199,38,234,50,204,184,51,64,233,52,141,100,55,178,169,49,24,200,38,55,62,63,72,55,14,71,240,49,6,130,49,57,249,112,197,75,51,109,192,142,
69,239,54,50,108,197,96,164,21,107,209,144,168,115,209,255,255,255,255,255,255,255,255,253,6,3,7,134,52,147,230,109,37,198,210,205,102,30,144,236,134,
199,207,22,70,195,32,236,134,31,120,83,39,230,210,28,82,68,112,183,217,196,53,6,172,63,24,255,251,50,196,255,131,199,180,35,24,14,255,162,65,2,
132,227,65,223,240,72,140,10,143,141,126,28,141,211,134,108,255,255,179,255,255,255,255,244,255,255,255,233,251,19,16,83,81,76,203,142,77,234,50,96,161,
50,188,206,51,209,63,54,134,100,48,238,7,93,54,44,249,51,54,3,135,47,48,222,65,254,56,17,140,198,40,227,98,54,78,11,160,53,137,248,196,64,
84,174,113,101,195,3,127,255,255,255,255,255,255,255,255,254,147,5,196,19,32,139,3,65,213,51,124,42,227,17,252,131,19,117,19,234,243,114,84,131,51,
18,104,46,131,141,222,19,79,213,51,75,18,163,76,95,115,48,201,179,255,251,50,196,255,131,199,220,35,24,14,255,162,65,2,132,227,65,223,240,72,10,
0,132,23,101,143,252,98,146,219,151,255,255,95,255,255,255,255,247,127,255,255,255,90,98,10,106,41,153,113,201,189,50,92,162,50,176,211,51,189,70,54,
74,119,48,230,199,146,53,252,58,194,53,212,199,98,48,214,2,21,55,121,208,199,200,51,103,179,142,25,149,53,177,236,196,160,36,173,113,165,163,207,122,
63,255,255,255,255,255,255,255,255,160,193,224,216,200,178,156,208,229,24,223,250,100,196,156,31,184,222,9,242,200,221,82,31,200,196,183,11,92,227,199,120,
211,197,96,210,116,196,210,104,16,203,162,120,255,251,48,196,255,131,199,176,35,24,14,255,130,65,3,132,227,65,223,240,72,194,112,45,20,25,219,249,27,
167,176,245,127,255,213,255,255,255,255,253,255,255,247,255,191,212,152,130,154,138,170,170,50,88,165,50,164,216,51,153,81,54,22,134,48,222,135,197,53,201,
252,63,53,162,135,151,48,205,194,40,54,226,28,201,103,99,107,49,206,132,53,217,216,196,192,52,174,113,101,215,180,27,255,255,255,255,255,255,255,255,255,
244,152,82,23,153,36,79,26,50,156,156,25,64,24,151,35,212,155,216,93,79,155,193,35,215,152,154,1,98,28,134,237,154,114,173,154,60,156,26,59,9,
153,102,82,255,251,50,196,255,131,199,172,35,24,14,255,130,65,7,132,227,65,223,240,72,152,72,5,34,155,56,127,227,20,150,220,191,255,250,255,255,255,
255,255,255,255,255,255,173,49,5,53,20,204,184,228,222,50,84,164,50,144,221,51,125,88,53,218,151,48,214,71,244,53,148,189,166,53,111,71,198,48,196,
130,61,54,74,96,202,198,179,111,175,14,57,119,54,1,196,197,32,4,113,113,165,183,246,28,255,255,255,255,255,255,255,255,255,244,24,96,18,25,50,74,
154,64,150,28,51,52,152,154,131,176,27,238,188,57,27,214,131,180,24,157,33,88,156,144,235,26,108,175,26,46,159,154,33,15,25,84,84,255,251,50,196,
255,131,199,144,35,26,14,255,130,65,12,133,35,1,223,244,72,24,70,6,160,227,59,127,35,116,246,30,175,255,255,255,255,255,255,255,255,254,255,247,250,
147,16,83,81,106,170,170,170,50,72,167,50,132,224,51,89,97,53,158,166,48,205,136,35,53,93,126,251,53,57,7,245,48,187,194,78,53,146,164,204,101,
195,115,44,206,75,102,54,41,168,197,64,20,114,117,98,215,180,45,233,255,255,255,255,255,255,255,255,254,147,17,66,51,46,10,35,85,84,147,157,42,99,
22,132,129,115,146,75,219,179,142,212,130,51,22,208,47,227,169,97,83,88,217,115,77,151,67,75,231,179,47,204,255,251,48,196,255,131,199,152,35,26,14,
255,130,65,16,133,35,1,223,244,72,147,10,1,34,241,176,199,110,24,164,182,229,255,255,215,255,255,255,255,253,223,255,247,127,187,214,152,130,154,139,85,
85,49,244,142,50,16,197,50,197,56,52,162,93,48,171,199,70,52,130,184,98,52,99,199,30,48,155,130,19,52,58,120,203,132,51,103,164,14,5,41,53,
97,84,20,70,79,151,90,118,252,99,19,1,99,48,73,115,87,19,131,160,104,147,22,240,123,195,149,23,176,195,145,128,124,163,23,52,46,83,170,32,227,
87,153,131,75,87,211,72,40,99,45,12,195,9,65,84,2,48,247,98,55,79,96,255,251,50,196,255,131,199,164,39,26,14,255,130,65,10,133,35,1,223,
244,72,250,191,255,234,255,255,255,255,254,255,255,251,255,223,234,76,65,77,69,51,46,57,55,85,85,85,85,85,85,85,85,85,49,232,145,50,4,198,50,
161,61,52,110,104,48,163,7,105,52,77,249,107,52,48,7,67,48,146,194,32,51,130,180,204,227,67,106,33,206,19,26,53,137,64,20,73,79,167,86,122,
245,38,42,129,102,99,17,70,178,165,39,70,77,6,46,168,236,39,47,87,8,103,40,24,238,38,47,16,89,135,86,193,38,173,179,166,145,48,70,137,210,
102,85,154,38,17,2,136,7,97,142,220,49,73,109,203,255,251,50,196,255,131,199,164,39,26,14,255,130,65,12,133,35,1,223,244,72,255,255,175,255,254,
175,255,255,187,255,254,239,247,122,211,16,83,81,76,203,142,77,213,85,85,85,85,85,85,85,85,85,49,228,144,49,240,201,50,133,66,52,42,117,48,154,
199,138,52,23,58,94,51,251,71,100,48,137,130,47,50,234,232,205,194,115,109,159,14,29,11,53,161,44,28,74,79,151,90,118,253,64,35,112,206,242,76,
218,37,0,239,122,124,198,194,31,240,235,227,243,32,234,212,32,72,198,207,12,84,241,73,40,216,135,104,212,55,4,210,203,248,203,163,216,194,112,116,184,
11,157,200,127,229,246,30,175,255,251,50,196,255,131,199,176,39,26,14,255,130,65,17,133,34,193,223,244,72,255,250,191,255,255,255,255,191,213,255,239,255,
127,169,49,5,53,20,204,184,228,221,85,85,85,85,85,85,85,85,85,85,49,216,145,49,220,204,50,97,73,51,238,126,48,145,135,169,51,222,123,67,51,
195,7,131,48,128,194,60,50,35,28,207,33,131,112,28,206,38,250,53,185,16,28,77,79,167,150,122,198,21,17,29,230,122,16,134,213,165,167,129,78,198,
54,232,241,103,100,39,91,152,244,102,55,32,94,199,139,200,102,193,187,166,154,56,198,141,225,102,87,159,102,17,3,197,195,92,142,219,249,44,182,101,255,
251,48,196,255,131,198,48,37,28,14,255,130,105,18,5,34,193,223,244,72,127,255,245,255,255,255,255,255,119,255,253,223,238,245,166,32,166,162,153,151,28,
155,170,170,170,170,170,170,170,170,170,170,49,212,144,49,200,207,50,61,76,51,170,135,48,136,199,196,51,163,60,20,51,137,199,160,48,118,130,73,49,107,
72,208,0,147,114,154,14,44,233,53,209,4,32,156,164,94,105,13,186,128,201,73,164,100,73,190,10,1,239,245,57,143,220,64,145,230,195,234,33,228,72,
65,161,143,230,25,249,241,84,81,182,145,33,170,176,137,166,92,49,151,73,33,132,225,56,48,0,86,246,176,237,203,231,255,251,50,196,255,131,198,44,37,
28
Last edited by curt2go on Thu Apr 14, 2016 11:32 pm; edited 2 times in total |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Thu Apr 14, 2016 10:56 pm |
|
|
it chopped off the CONST int some but there is enough there to get a good sample.
Also here is the missing variables.
/ Global Variables
unsigned long file_size;
const int BYTES_2_WRITE = 32;
const int16 BUFFER_SIZE = 512;
char mp3_buffer[BUFFER_SIZE];
char volume_left, volume_right; |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Apr 15, 2016 11:30 am |
|
|
Curt, you say things like this:
Quote: | it does the same thing |
But you never actually told us what it is doing, or not doing.
I would guess that you expect to hear a 440 Hz tone. But what is it
actually putting out ? White noise ? or what ?
Quote: |
It does sound like parts of it are putting the right sound out either writing
one at a time of 32 at a time. |
Explain this better. Does it put out audible bursts of 440 Hz for 1 second,
and then noise for 5 seconds ? Or what does it do ?
Quote: | I am using 5.056 compiler 18F87K22 |
Post your #fuses, #use delay(), and a link to your schematic.
Also, if Mikroe has sample code (in any language), post a link to that. |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Fri Apr 15, 2016 12:56 pm |
|
|
First off thanx for looking. This has been frustrating to say the least.
I am expecting a 440Hz tone but what I hear is a tone that sounds like 440 for short but not consistent times but then the sound moves up and down and speeds up and slows down. It sounds like a long stomach rumble that speeds up at the end. It is supposed to be 5 seconds of 440Hz. Its a hard sound to describe.
Here is the code that I got mine from.
http://libstock.mikroe.com/projects/download/207/0/207_mp3_click___example_v1.0.0.0.zip
I am using the first example in the list.
Schematic is http://download.mikroe.com/documents/add-on-boards/click/mp3/mp3-click-manual-v100.pdf
Thanx for any help. I am pulling my hair out.
Here is the fuses and some other register settings.
Code: | #include <18F87K22.h>
#device ICD=TRUE
#device adc=10 *=16
#FUSES NOWDT //No Watch Dog Timer
//#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES INTRC_IO //High speed Osc (> 4mhz)
#FUSES PROTECT //Code protected from reads
#FUSES NOIESO //Internal External Switch Over mode enabled
#FUSES BROWNOUT //No brownout reset
//#FUSES BORV45 //Brownout reset at 2.5V
#FUSES PUT //Power Up Timer
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES DEBUG //No Debug mode for ICD
//#FUSES NOLVP //Low Voltage Programming on B3(PIC16) or B5(PIC18)
#FUSES NOWRT //Program memory not write protected
#FUSES NOCPB //No Boot Block code protection
#FUSES NOEBTRB //Boot block not protected from table reads
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES NOWRTC //configuration not registers write protected
#FUSES NOWRTB //Boot block not write protected
#FUSES FCMEN //Fail-safe clock monitor enabled
//#FUSES LPT1OSC //Timer1 configured for low-power operation
#FUSES NOMCLR //Master Clear pin enabled
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES BBSIZ1K //1K words Boot Block size
//#FUSES CCP2C1
//#FUSES SOSC_DIG
//#FUSES WDT8192//65536
//#FUSES PLLEN //enable the PLL
#use delay(clock=8000000)
//#use rs232(baud=9600, RECEIVE_BUFFER=100,PARITY=N,ERRORS, UART2, stream = RN4020)
//#use rs232(baud=1200,parity=N,xmit=PIN_c6,rcv=PIN_c7,errors,STREAM=com_a)
//#use fast_io(A)
//#use fast_io(B)
//#use fast_io(C)
//====================================== VARIABLES
#byte SSPBUF = 0xfc9
#bit SSPIF = 0xf9E.3
//#bit RCON_7 = 0xfd0.7
//#bit INTCON2_6 = 0xff1.6
#bit WCOL = 0xfc6.7
#byte INTCON = 0xff2
//#byte INTCON2 = 0xff1
//#byte INTCON3 = 0xff0
#byte TRISB = 0xf93
#byte LATB = 0xf8A
#byte LATE = 0xF8D
//#byte LATC = 0xf8b
#byte TRISC = 0xf94
#byte SSPSTAT = 0xfc7
#byte SSPCON1 = 0xfc6
#byte ADCON1 = 0xfc1
#byte LATA = 0xf89
#byte TRISA = 0xf92
//#bit SSPCON = 0x215.5
#define MP3_CS_HI output_high(pin_E1)
#define MP3_CS_LO output_low(pin_E1)
//#bit MP3_CS = LATE.1
//sbit MP3_RST_Direction at TRISC0_bit;
//sbit MP3_RST at LATC0_bit;
#define MP3_RST_HI output_high(pin_A4)
#define MP3_RST_LO output_low(pin_A4)
//sbit DREQ_Direction at TRISA0_bit;
//sbit DREQ at RA0_bit;
#define DREQ input(pin_a1)
//#bit DREQ = 0xF80.1//pin_A0
//sbit BSYNC_Direction at TRISB0_bit;
//sbit BSYNC at LATB0_bit;
//#bit BSYNC = LATB.1
#define BSYNC_HI output_high(pin_B1)
#define BSYNC_LO output_low(pin_B1)
// MMC module connections
//sbit Mmc_Chip_Select at LATE1_bit; // for writing to output pin always use latch (PIC18 family)
#define MMC_CS_HI output_high(pin_e0)
#define MMC_CS_LO output_low(pin_e0)
//sbit Mmc_Chip_Select_Direction at TRISE1_bit;
//sbit Mmc_Card_Detect at RA1_bit; // for detecting microSD card presence
//sbit Mmc_Card_Detect_Direction at TRISA1_bit;
#define MMC_CD input(pin_a0)
// Buttons for Left/Right Volume control
//sbit BtnLeftDown_Direction at TRISD3_bit;
//sbit BtnLeftUp_Direction at TRISD2_bit;
//sbit BtnRightDown_Direction at TRISD1_bit;
//sbit BtnRightUp_Direction at TRISD0_bit;
//sbit BtnLeftDown at RD3_bit;
#define BTN_LEFT_DOWN input(pin_d3)
//sbit BtnLeftUp at RD2_bit;
#define BTN_LEFT_UP input(pin_d2)
//sbit BtnRightDown at RD1_bit;
#define BTN_RIGHT_DOWN input(pin_d1)
//sbit BtnRightUp at RD0_bit;
#define BTN_RIGHT_UP input(pin_d0)
// VS1053E constants
#define WRITE_CODE 0x02
#define READ_CODE 0x03
// Module constants
#define SCI_BASE_ADDR 0x00
#define SCI_MODE_ADDR 0x00
#define SCI_STATUS_ADDR 0x01
#define SCI_BASS_ADDR 0x02
#define SCI_CLOCKF_ADDR 0x03
#define SCI_DECODE_TIME_ADDR 0x04
#define SCI_AUDATA_ADDR 0x05
#define SCI_WRAM_ADDR 0x06
#define SCI_WRAMADDR_ADDR 0x07
#define SCI_HDAT0_ADDR 0x08
#define SCI_HDAT1_ADDR 0x09
#define SCI_AIADDR_ADDR 0x0
#define SCI_VOL_ADDR 0x0B
#define SCI_AICTRL0_ADDR 0x0C
#define SCI_AICTRL1_ADDR 0x0D
#define SCI_AICTRL2_ADDR 0x0E
#define SCI_AICTRL3_ADDR 0x0F |
|
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Fri Apr 15, 2016 2:05 pm |
|
|
I did actually notice that I have my delay clock at 8Mhz but running the processor at 32. But I am not using any delays in my routines so it should not affect anything? I will change it to be proper though. I will also note I have tried at 64Mhz- 8 MHz just to see if that would change anything. It obviously changes the SPI speed so that is why I tried it. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Fri Apr 15, 2016 4:46 pm |
|
|
#FUSES DEBUG //No Debug mode for ICD
this will affect opertion of the PIC
Also you've got 'protect' enabled in fuses. Not a good idea unless this is literally going out the door to a customer.
Having so many //dead code here is confusing to my old eyes...hard to follow.
jay |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Fri Apr 15, 2016 9:57 pm |
|
|
Sorry about all the commented out code. I just have been trying so many different ways to get it working. I agree the protect and debug can affect things but I don't think in this case they are the culprits. |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Fri Apr 15, 2016 10:02 pm |
|
|
It also is supposed to be 5 seconds of sound and it only takes about 3 seconds to get through it. Which is very weird because the VS1053 chip lets you know when the buffer is full and you have to wait for it to send more bytes to it.
I changed the delay and the fuses and no luck. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Sat Apr 16, 2016 5:01 am |
|
|
Ok, back to basics.
cut a small code to to the 'IHZ LED' test.
code/compile.download and test.
confirm PIC is running at the correct speed with LED flashing at a 1 puer second rate.
Then compile some test code to set/read back several registers of the mP3 player.Don't write then read back the same register, do several writes, then read say the 2rd and 5th back. This will confirm proper communication to the MP3 device.
Now I am making a HUGE assumption that both PIC and MP3 player are BOTH 3 volt devices or that you've got th ecorrect level translation between them.
Als0 , since you're using fast_io be sure EVERY I/O pin is properly configured for either an input or output! ONE bit wrong and wll, it won't work right......
hope some of this helps
Jay |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Sat Apr 16, 2016 9:25 am |
|
|
I do agree with the back to basics. That is where this code started from. As I got things rolling I kept adding what I needed in. I am not using the fast IO I have it commented out. Just one of those quick things I tried along the way.
I have with this same code written and read multiple registers with success. I have also put the VS1053 into test mode and that can only be doen by writing properly to the SCI registers as well as the SDI registers on the chip. I have also fed it with an MP3 and read back the HDAT0 and 1 registers from the VS1053 to make sure that it recognizes the encoding. It does. Ican check the bits structure to see that. Also if it does not recognize it those will be filled with 0.
I have thought it is a SPI speed issue but with a scope I can see that I am at 8MHz so that is plenty to feed the chip. I have also tried many other speeds.
I have found another driver built for the VS1011 online that I am going to try to rebuild from today. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Apr 16, 2016 10:33 am |
|
|
Quote: | I have with this same code written and read multiple registers with success |
I question this, because your read function below has multiple things
wrong with it.
1. In your while() loop, you're writing the value of 'temp' into a data buffer
but after you've done one pass through the loop, you never increment
the data buffer pointer to the next location.
2. Your make16() with two function calls to spi_get() as parameters is
highly dubious. The C language does not guarantee that the order of
evaluation of function parameters will be as you desire. In this case
you are depending on the first parameter being evaluated first, so you
will get the MSB first. This behavior is not guaranteed.
Quote: | void MP3_SCI_Read(char start_address, char words_count, unsigned int16 *data_buffer) {
unsigned int16 temp;
MP3_CS_LO;// = 0; // select MP3 SCI
spi_write(READ_CODE);
spi_write(start_address);
while (words_count) { // read words_count words byte per byte
words_count--;
// *** This next line depends on your assumption that the function
// *** parameters will be evaluated left-to-right. That behavior is
// *** not defined in C.
temp = make16(spi_get(),spi_get());
*data_buffer = temp;
// *** Missing increment of data_buffer pointer right here
}
MP3_CS_HI;// = 1; // deselect MP3 SCI
while (DREQ == 0) // wait until DREQ becomes 1, see MP3 codec datasheet, Serial Protocol for SCI
;
} |
Here is the sample code that you used as an example. Note that they
do not have any of the mistakes you made:
Code: |
void MP3_SCI_Read(char start_address, char words_count, unsigned int *data_buffer) {
unsigned int temp;
MP3_CS = 0; // select MP3 SCI
SPI1_Write(READ_CODE);
SPI1_Write(start_address);
while (words_count) { // read words_count words byte per byte
words_count--;
temp = SPI1_Read(0);
temp = temp << 8;
temp = temp + SPI1_Read(0);
*data_buffer = temp;
data_buffer = data_buffer + 1;
}
MP3_CS = 1; // deselect MP3 SCI
while (DREQ == 0) // wait until DREQ becomes 1, see MP3 codec datasheet, Serial Protocol for SCI
;
} |
Below, you are calling the read function with the value of 'i', when the
function definition clearly calls for a pointer. ie., the address of 'i'. (&i).
Quote: | long int i;
//MP3_SCI_READ(SCI_MODE_ADDR,1,i); |
|
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Sat Apr 16, 2016 10:53 am |
|
|
Thanx PCM. I know I did change the functions but when I was reading them I was putting a breakpoint in and reading temp and I was not doing anything with the dataBuffer so I did not think it mattered. I will go back to the original code and not hack it up. I am also going to start small again as my SPI clock does not look really clean at the high speeds which could be causing me issues. |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Sat Apr 16, 2016 7:44 pm |
|
|
It seems that it is losing the CODEC info. Here is a printout each 512 Bytes with the byte number and then the HDAT0HDAT1 bytes for the CODED. The data sheet says if it has 00's then the VS1053 can not decode properly. I guess I need to find a verified MP# file in hex format to start with instead of using my own one that I converted. Does anyone have one?
\0APlaying audio \0D
512:30C4, 1024:32C4, 1536:32C4, 2048:32C4, 2560:0000, 3072:0000, 3584:32C4, 4096:32C4, 4608:30C4, 5120:30C4, 5632:32C4, 6144:32C4, 6656:32C4, 7168:000
0, 7680:32C4, 8192:3BFF, 8704:A531, 9216:0000, 9728:32C4, 10240:32C4, 10752:32C4, 11264:32C4, 11776:0000, 12288:32C4, 12800:0000, 13312:0000, 13824:32C4,
14336:32C4, 14848:32C4, 15360:0000, 15872:0000, 16384:32C4, 16896:32C4, 17408:30C4, 17920:32C4, 18432:32C4, 18944:0000, 19456:32C4, 19968:30C4, 20480:32
C4, 20992:0000, 21504:30C4, 22016:32C4, 22528:0000, 23040:32C4, 23552:32C4, 24064:32C4, 24576:0000, 25088:0000, 25600:0000, 26112:32C4, 26624:32C4, 27136
\0AC4, 27648:32C4, 28160:32C4, 28672:30C4, 29184:0000, 29696:32C4, 30208:0000, Finished.\0D |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Sat Apr 16, 2016 8:13 pm |
|
|
I got it. I was converting the file to an unsigned int when it needs to be signed!
Thanx for the thoughts on this one. |
|
|
leonelralo
Joined: 27 Apr 2023 Posts: 1
|
I need help |
Posted: Thu Apr 27, 2023 10:00 am |
|
|
Hi I'm a student and i have to do a project using the pic18f4550 and the VS1053/1003 and i don't have any driver/library that i need, please help me with the .c files |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|