Write to the special function registers associated with the SPI peripheral. You can do this in either assembly language or the HLL of your choice. In order to do this a datasheet and a hardware reference manual will be most useful. Do you have a clock rate and a configuration in mind?