>Carey Fisher - NCS >> If you always read from PORTx and always write to LATx, you >> won't get bit by the Read-Modify-Write situation. >> Right? >Well, yes, but note that some instructions >both reads and write to the same FSR in the same >instruction, like BCF/BSF. If you concider those >as "write-only" instructions, then yes. :-) >And, you still might have the case of capacitive loading >on (output) pins that makes the READ from PORTx reading >the wrong state (that is, not what's in LATx). If you >have this rece condition, you might still need the >shadow register to hold a "copy" of your output status. >Jan-Erik. But, generally, in fact most of the time, if I'm reading PORTx I don't care what's in LATx since I'm using the port as an input, no? Carey -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads