Only a beginner assumes the tool is malfunctioning when he doesn't get the results he expects. Those of us with experience have learned that it is far, Far, FAR more likely that the tool is correct, and that we have done something wrong. So... review your code. Review the datasheet. Ask yourself, "what could I be doing, or be not doing, that would cause actual result X when I'm expecting result Y?" The chances that the mismatch is due to an error in the simulator is vanishingly small. The chances that the mismatch is due to something that a newcomer to PIC programming has overlooked is overwhelmingly large. Now, I have not programmed on the PIC16 chips and I'm not going to spend the time to dig through the datasheet right now, but I recommend that you insert a BANKSEL TRISC before line 13 and a BANKSEL PORTC instruction before line 17 in your code. I see that you've set RP0 in your code but I don't see you initializing RP1. The BANKSEL compiler directive ensures these bits are set correctly. OK, OK, I downloaded the datasheet... look at Example 4-4 in the datasheet for guidance. The second thing I would recommend is to determine if the PORTC pins are shared with any peripherals. If they are, determine whether or not you must disable those peripherals first. Most importantly, though, you should realize what a rash conclusion you've jumped to by assuming that the tool is malfunctioning instead of assuming that your code is not doing what you think it's doing. This is almost always an incorrect assumption. > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On > Behalf Of solarwind > Sent: Saturday, December 20, 2008 11:12 PM > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] MPSIM Showing Incorrect Values > > How can such a tool be useful when it is malfunctioning? > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist