Isn't RA4 open collector on the 877A? Are you trying to get it to source current by chance? Also, the 871 doesn't have comparators does it? Perhaps this is a clue to why it won't work on the 877A? And as a side note, Square 1 Electronics (http://www.sq-1.com/)has some great books, and are really nice people too. Just some ideas. Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams rrc124+@PITT.EDU wrote: > > Yeah here's the weird thing.. I tried that exact code on a 871 and I got a perfect reading. That's fine with me because i wanted to use an 871 all along...but it still upsets me that I can't figure out why the 877A won't work. The last weird thing is that RA4 won't output anything. RA4, as Jan-Erik pointer out earlier, is multiplexed to Timer0 CLK in. But in the OPTION_REG<5> i disabled using RA4 as CLK in and set it to use the internal instruction clk. So now everything is as it should be except i can't get any output to RA4. This whole thing is quite frustrating. Thank you for letting me know it works on 877, that helps narrow the problem a bit. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.