Skip to main content
mgerkens9
Associate II
February 29, 2008
Question

SSP and Chip Select

  • February 29, 2008
  • 2 replies
  • 890 views
Posted on February 29, 2008 at 13:08

SSP and Chip Select

This topic has been closed for replies.

2 replies

mgerkens9
mgerkens9Author
Associate II
May 17, 2011
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 III
May 17, 2011
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.