Well documented PIC Quirk. ----- Original Message ----- From: "Michael Simpson" To: Sent: 12 January 2003 20:42 Subject: [PIC]:18F IOports observations Just an observation but never rely on the last setting of an IO port when you change it from input to output. I found that while a port is in input mode various anomalous things can happen to the latch bit so when it is changed back to output the last PORTX or LATX setting may not hold true escpecialy if you are changing bits output bits on the same port. Best thing to do if you are changing the output state by changing the TRISX bits. Always force the PORTX bit back low when setting TRISX bit to 0 (output) -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads