>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >Sent: 23 October 2006 19:08 >To: Pic List >Subject: [PIC] SSP Write Collisions > > >I'm, for some reason, getting write collisions (SSP1CON1,WCOL >set) on an 18f8627. I'm doing a relatively slow spi (200kHz) >using TMR2 for the bit rate generator. After writing to >SSPBUF, I sit in a loop waiting for SSP1STAT,BF to go true, >then read SSPBUF. I then go on and do other stuff, but my next >write to SSPBUF sets SSP1CON1,WCOL, and everything seems to >stop. I'm thinking that maybe BF goes true when the last bit >is read, but perhaps the last bit's transmission is not yet >complete (maybe a half bit time left)? Does this sound right? >Is there anything else besides BF I can check to avoid this problem? You could try polling SSPIF instead. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist