>I should have explained better. The problem does not arise >with the code from AN734. But the reason why it does not arise >with that code is because it is doing something that >theoretically it does not need to do, according >to the datasheet and to the application note itself. Yeah, sure (see also Michael Rigby-Jones answer to mine). However it is evident that they have allowed for it in the operation of the chip (see the description of the SSPCON register at the start of the section on the MSSP), and the example code obviously had a problem until they did exactly that, presumably because they had exactly the problem you have, and that is how they got around it. I suspect a race condition inside the chip for exactly how it decides it is ready to accept the next character. The bit that worries me is that in the description of the slave mode operation there is not a single mention of the WCOL bit, suggesting that it should not happen unless you try and write before the SSPBF goes false. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist