Sean Breheny wrote: > Well, I understand and agree with you that this is necessary with > bi-directional ports, but the whole point of that last message to which I > responded was that it was not only necessary in the bi-directional case, > but even when a pin remained as just an output! It was that assertion that > I was questioning. I agree with you that the original described behavior is (probably) a symptom of an electrical problem. I had something similar when I mistakenly connect the katode of a protection diodes to Vss instead Vdd. This sort of connection didn't hurt the PIC (they are quite resistant: I put them backward from time to time) but I am sure that reading the pin should give a '0' and not the value written on the port register (this is less dangerous if you use the OC pin, of course). Thinking again on the problem I recall that if you set the I/O pin for analog conversion (using ADCON1 register) you can make them digital output (just set the TRIS bits accordingly) but if you read them, you always get '0' (check the 16C73 data sheet 'I/O ports' and 'A/D converter module'). Could this be the case? If so, check ADCON1 or, if you need A/D, use the shadow register. Otherwise double check the wiring. Ciao Marco ---- Marco DI LEO email: m.dileo@sistinf.it Sistemi Informativi S.p.A. tel: +39 6 50292 300 V. Elio Vittorini, 129 fax: +39 6 5015991 I-00144 Roma Italy