Where to start: that MCU is ancient; is there any reason you are using that chip and not a more up to date one?
Do you understand the basics of how an SPI peripheral works? The mechanics of how to use the MSSP peripheral in SPI mode are fairly well explained in the data sheet but you need to know some basics of SPI exchanges. For a start, there are two 'modes' of operations - master and slave. The master (which your PIC is - NOT the ADC chip; step 2 on page 15 of the Ti data sheet is very clear about this) will generate the SCK signal only while an exchange is in progress. An exchange is initiated when you write a value into the SSPBUF register.
The typical way to use a SPI mater is:
Code:
// drop the \SS\ line to select the slave device
SSPBUF = valueToSend; // Initiate an exchange by sending something
while( !SSPSTATSbits.BF); // Wait until the exchange is complete
valueReceived = SSPBUF; // Save the value that you have received
// Raise the \SS\ line to deselect the slave device
Within the MCU, you need to make sure the oscillator is set up correctly and the port pins are set to input or output correctly. You therefore need to SCK, SDO and whatever line you want for the \SS\ signal to be outputs, and the SDI line to be an input. As for the oscillator, the ADC chip has a clock rate between 10KHz and 400KHz (the Fclk parameter at the top of the table on page 6) and so you need to know the system clock speed (generated by the crystal or external clock or, in your case, the RC components), the PLL configuration and hence the Fosc frequency. From this you can work out the required division to be set in the SSPCON1bits.SSPM.
Now the value you need to send to the slave depends on what the slave is expecting. In your case you will need to read the Ti data sheet, and Figure 18 and "The Digital Interface" section on page 15 seem to be relevant.
Now, looking at the Ti data sheet, you need to deliver at least 12 clock pulses per conversion. This is a little tricky for the PIC as it will only work in 8-bit increments. Therefore you need to see if you can exchange 2 8-bit values (you do this by repeating the code between lowering and raising the \SS\ line) have have the ADC accept it; if it MUST have 12 clock pulses the you will need to "bit-bang" the SPI interface and not use the PIC hardware - that will make things a lot harder for your code but it is not impossible and there are a number of examples of how to do this on the internet).
In your configuration section, you don't need to set anything to the default settings - in this case just about all of the protection bits will be the way you want them if you leave them alone.
However, I strongly recommend that you DON'T enable the BOR until you have everything working correctly; otherwise any flicker on the power lines will have you chasing down problems that don;t exist in your code.
Enough for now
Susan