VS1011e - Can R/W SCI reg but SDI does not work
Moderators: adafruit_support_bill, adafruit

VS1011e - Can R/W SCI reg but SDI does not work

by shivs on Thu Mar 15, 2007 1:15 am

Well Ive been searching these forums for a while and Ive tried a couple things but no success.

Heres my setup.
I'm using a VS1011e interfaced to a PIC18LF452. Im using the VS1011e in the SDINEW, SDISHARE and TESTS (set SCI_MODE to 0x0C20). Im using a 24.576MHZ crystal and my hardware setup is almost exact to that in the vs1011e datasheet (except XDCS is pulled high with resistor). I have a 100uF (electrolytic) on the output of the left channel with a speaker connected to the cap(-) to GND. I have successfully written and read various registers with no problem. Also as in vs10xxan.pdf I have checked the voltage across Rcap to be 1.2V (should be around 1.3V)
But when I try to run the Sine tests or Memory test, there is no response.
Code: Select all | TOGGLE FULL SIZE
void vs1011_sinetest(){

setup_spi(SPI_MASTER | SPI_L_TO_H | SPI_CLK_DIV_64); //   20Mhz/64 = lowest possible speed available from PIC

int8 data[32];
int loop=0;

vs1011_hw_reset();                                      // toggle XRESET pin with 10ms delay in between
vs1011_write_cmd(MODE_REG,0x0C,0x20);  //SDINEW, SDISHARE and TESTS
vs1011_write_cmd(VOL_REG,0x00,0x00);     //set volume to max

output_high(VS1011_XCS);                           //enable SDI bus

              data[0]=0x53;
              data[1]=0xEF;
              data[2]=0x6E;
              data[3]=0x44;
              data[4]=0;
              data[5]=0;
              data[6]=0;
              data[7]=0;
              while(!input(VS1011_DREQ)) printf("Dreq Busy\r\n");

         for (loop=0;loop<8;loop++){
                 spi_write(data[loop]);
                 printf("0x%x ",data[loop]);
              }
         while(1);                //should have a 1Khz sine wave constant output but does not work
}


I do have this circuit bread boarded but I cant see why that would matter because SCI works just fine.
There no should be no difference in the SPI protocol between SCI and SDI buses except setting the XCS to high right? (high for SDI low for SCI)

Any suggestions hardware or software wise?
shivs
 
Posts: 1
Joined: Thu Mar 15, 2007 1:12 am

by andyolivares on Sun Nov 04, 2007 3:12 pm

Same problem here... I think my hardware is ok and DREQ is going low and high as the datasheets says, but when I try to run the sine test, nothing happens. Did you find any workaround to this problem? Maybe I'm doing something incorrect and I don't know. What about you?

Thank you,

Andy
andyolivares
 
Posts: 2
Joined: Sun Nov 04, 2007 3:11 pm