>-----Original Message----- >From: Jinx [mailto:joecolquitt@CLEAR.NET.NZ] >Sent: 25 June 2004 12:32 >To: PICLIST@MITVMA.MIT.EDU >Subject: [PIC:] MSSP module > > bcf pir1,sspif > mov 0x55,sspbuf ;send data > btfsc pir1,sspstat,r_w > bra $-2 > > bcf pir1,sspif ;wait for ACK > btfss pir1,sspif > bra $-2 > I'm a little surprised that this works. The SSPIF bit gets set at the same time that RW gets cleared, which is on the falling edge of the acknowledge clock pulse. Unless I have missed something, you are clearing SSPIF directly after it has been set, and are then waiting for it to be set again. 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. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads