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
setup_spi(SPI_MASTER | SPI_L_TO_H | SPI_CLK_DIV_64); // 20Mhz/64 = lowest possible speed available from PIC
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
while(!input(VS1011_DREQ)) printf("Dreq Busy\r\n");
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?