cancel
Showing results for 
Search instead for 
Did you mean: 

SSP and Chip Select

mgerkens9
Associate II
Posted on February 29, 2008 at 13:08

SSP and Chip Select

2 REPLIES 2
mgerkens9
Associate II
Posted on May 17, 2011 at 09:50

Hi all,

i use the SSP0 for more than one Device on the bus. So, i have to toggle Port-Pins for the Device-Specific Chip Select.

What Register must i check that i know that the last transmition to the device is ready and i can set the Chip Select to ''1''?

Bit ''0'' in the SSP0_SR doesn't work correctley...when it indicates a empty FIFO, the data is still clocked out (for SCLK < 1MHz)

Thanks,

Michael

jpeacock2
Associate II
Posted on May 17, 2011 at 09:50

Remember that SPI interfaces are always bi-directional, even if you ignore the input side while sending. the best way to test for an inactive SPI bus is to read in the data after every corresponding byte clocked out. Ignore the actual data read but keep a count. After the last data byte is read in, you are guaranteed that the bus is no longer generating a data clock.