On Wed, 2011-01-19 at 12:58 -0800, Bob Blick wrote: > Weird, could I have a bad PIC? But it was one that had been kicking > around, so I figured it could be. I grabbed a new chip and it worked > fine. >=20 > Last night I took a few extra minutes to review my code in preparation > for doing a PC board layout and realized nothing was connected to GPIO4. > I had the IR receiver going to pin 4, which is GPIO3 and also MCLR. In > my sleepy head at one point I must have seen pin 4 on my breadboard and > typed GPIO4 in the code instead of GPIO3. >=20 > Since MCLR is input-only, it didn't short out the IR receiver, and the > pin that was looking for the signal was just getting a little stray > coupling and that's the only reason anything worked. It didn't work the > same on both chips because the leakage of the two was different. >=20 > I changed the pin definition and the TRIS line to reflect the actual > configuration, and both chips worked when programmed. >=20 > So the huge amount of crosstalk in the solderless breadboard was the > only reason it sort of worked. >=20 > Boy, did I feel dumb! You shouldn't feel dumb at all! I read this and was impressed that instead of going into "dead fish" territory, you debugged the problem and found a solution. I'm amazed how many engineers I encounter that would have thrown up their hands and walked away when confronted with this sort of problem. Yes, setting for the wrong pin was a "dumb" mistake, but it's not something I'd feel "dumb" about in your shoes. Congrats on figuring it out. TTYL --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .