> However, each GPIO goes to one AND-input (and one red LED) each, and > from the same input it goes through the cable in question to test, and > the opposite end of the cable goes to the second AND-input. The > AND-output goes to a green LED. > > This means as soon as one GPIO goes high, one AND-input and one red > LED goes high, and if the cable is functional, the other end makes the > second AND-input high, making the output high, making the green LED > lit. > > I'm not sure if I'm making sense, but I hope so. The design looks fine to me. Do add pull-down resistors to the second AND inputs though, if you haven't already. My suggestion: whip out a multimeter (or just hotwire some LEDs) and test the PIC outputs. You might have miswired the AND gates, or maybe the chip is defective, or the wire to test is wired wrong (in which case your tester seems to be working perfectly). Testing the midpoint (the PIC outputs) will allow you to rule your program out, if it's not the problem. With the behavior you described, it might be that the cable-to-test is miswired. If there are no pull-downs on the AND gate inputs, you can get all sorts of funky behavior due to varying charge on the FET gates when inputs are floating (especially if a long but unterminated wire is connected). Once you do add pull-downs, if the behavior persists, it might be the test wire is just connected improperly, or the AND gates are (assuming the PIC tests out fine as above). If the PIC doesn't put out the proper states, then either there's someone competing with it (e.g. the AND gate outputs are wired to the PIC outputs), or there's a code problem (As others have mentioned, check analog mode. Doublecheck TRIS too.) -- Hector Martin (hector@marcansoft.com) Public Key: http://www.marcansoft.com/marcan.asc -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist