You are not being overly paranoid. Use a shadow register! Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: "Bob Barr" To: Sent: Friday, May 18, 2001 2:09 PM Subject: [PIC]: Port B Change Interrupt - Looking for Trouble? > Hi all, > > I'm about to use the Port B change interrupt for the first time in a 16F84 > project. > > Because of the warnings that I've seen in the Microchip docs, I've tried to > minimize reads of Port B. All of my inputs (other than the interrupt > sources) are on Port A and all of my outputs on Port B. I don't have to read > Port B except after the interrupt occurs. > > To re-use some existing code, I'd be using bsf and bcf instructions to > control my Port B outputs. Since these instructions operate as a > read-modify-write, I'm concerned that using them may cause a conflict with > the interrupt-on-change operation. > > If need be, I can maintain a shadow register and only do pure writes to Port > B. Using bcf/bsf would be much easier. Is a shadow register necessary or am > I just being overly paranoid about mixing read-modify-writes with > interrupt-on-change? > > (I'm operating on the ASSumption that the read of port B allows some window > of time when the change interrupt could be missed. Is this a valid > assumption or am I missing something obvious here?) > > Thanks, Bob > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics