cancel
Showing results for 
Search instead for 
Did you mean: 

Delay looking for SSCBSY in SSC

Posted on March 31, 2008 at 13:59

Delay looking for SSCBSY in SSC

1 REPLY 1
Posted on March 31, 2008 at 13:59

I have noticed there is a significant delay between the time a byte is loaded into the SSCTB and when the SSCBSY flag is set.

Running an ST10F276 at 40 MHz, I notice a 2 micro second delay.

Here is the code:

SSCTB = 0xAA;

//Delay before checking the SSCBSY Flag

DELAY_FOR_SSCBSY_FLAG(); //This is a number of of _nop() to provide at least a 2 micro second delay

//Now that we waited for the delay time, wait for the SSCBSY flag to clear

while (SSCBSY)

{

_nop();

}

//now the SSCBSY flag is clear, read a value from the receive buffer

return ((BYTE)SSCRB);

What is the WORST CASE delay time I need to wait after the SSCTB is loaded for the SSCBSY flag to be asserted?