> Why bother clearing TRISB All the PICs I've used have their pins set to inputs on power-up, ie TRIS is all '1'. From what I know, this is true for every family. CLRF TRIS sets them all to output Simply put, for general use - PORT is the state of the pins (read) LAT is the value to write to a pin (write) TRIS is the data direction Using PORT for output leaves you vulnerable to read-modify-write problems, because PORT will read the pin before writing to the latch, which is also the architecture of LAT-less pre-18F PICs You can also read LAT, which returns the contents of the output latch Read Section 30 for more detail http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=3Den532310 I don't think any PICs with LAT need BANKSEL Joe =20 * * ********** Quality PIC programmers http://www.embedinc.com/products/index.htm --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .