>I still have to fully understand why CKP should be set at >that point, but of course I'll believe the gurus... > >A code comment here says that we should never get to that >state; having to add that instruction at that place implies >that for the whole thing to consistantly succeed afterwards >it first has to fail once and reach this uncontrolled >state... Strange... Umm, not sure about never getting there. I haven't refreshed myself properly about how the code works, but from the quick glance through on writing the previous message, it will get there if the master sends back a NAK when the slave is sending data to the master. The result is that there is no release of the clock by the slave for the master to do the next message - i.e. the slave is doing a permanent clock stretch. Is this what you see on the scope when your system gives up? Will organise the module for you, I have to go turn on a machine on another floor to get the most current version. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads