Quoting Oli Glaser : > I haven't used this PIC, but don't you need to clear ANSEL too? Oli, This appears to have been the problem, thank you so much. The =20 datasheet specifically says that read-modify-write is affected when =20 pins are configured as analogue. I haven't tested on the board yet but the MPLAB sim now works correctly. David --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .