Chris McSweeny wrote : > Thanks for clarifying that. So as I originally suggested, with a 12f683 I > can rely on the port latches being initialised to low and simply set the > TRIS as appropriate. No no no, that's not *generaly* so. It depends on what you "do" with the other pins on GPIO. I thought my description of the case where RMW will bite you was clear enough. And there is *no* difference between 12F629/675/683 in this case (besides of some default, but...) Or *any* other PIC16 or PIC18 (as long as we are talking about the PORTx registers). > Jan - when I was suggesting doing a movlw, movwf TRIS, that was to switch > one pin to low and another pin back to OC at the same time, though I could > presumably just as well do bcf, bsf on the appropriate bits. Depends on your timing requirements. I just thought you where changing *one* bit in TRISIO, and thought there was no need to mess with W in that case. > I've not got a good idea what's going on the other end of the resistor - it > is a current setting resistor in a boost constant current regulator. I guess > thinking about it, it is more likely to be switched with a very low duty > cycle when I'm measuring rather than a fixed low voltage - I shan't be > relying on the value when it's switched anyway (though actually now slightly > concerned it may go above VDD). OK, I though it was a "normal" pullup... Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist