Sorry DT
I wasn't complete in my previous answer.
The first thing I did was to test with the addition of the while loop as you proposed and it wasn't successful, i.e. No toggle on PORTB.0 signal. It looks like the While loop is blocking the process (or like SSPIF is never set). if I suppress the while loop the PORTB.0 will toggle again.
That's the reason why I thought about setting the interrupts.
Bookmarks