Hi there I would just like some opinions on this. Does this solve the read-modify-write problem. All PIC pins have external pull-ups. When the program starts the instruction CLRF PORTX is issued to write a logic '0' to the data latch. If you want a logic '1' on the port you simply make it an input, by writing a '1' in the TRISX register corresponding to the bit position. If you want a logic '0' you make the port pin an output and as the data latch already contains a '0' you know that the pin will pull the external pull-up to ground. You no longer read and modify the PORT, but rather the TRIS register for that port. Any thoughts on this method? Regards Gavin -------------------------- vulcan@ihug.co.nz http://www.geocities.com/TheTropics/Cabana/2625 --------------------------