Look in the I/O Port section of the 12F509 data sheet. There's a
schematic of a circuit for an i/o pin. Compare it to the 16F877
data sheet. You'll notice that the 12F509 doesn't have a tri-state
buffer going from the TRIS latch to the internal data bus. But the
16F877 does have it. Therefore you can't read the TRIS latch on
a 12F509. That's how you find the answer to this question.
Actually, also on that page in the 12F509 data sheet, it says this:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum