Okay, I think I have the answer, and it lies with the PICkit2 programmer operation (and my own ignorance, of course.) If the '690 is configured for external MCLR and MPLAB is set to drive MCLR low and the chip is programmed, there is a small delay between when the PICkit2 programmer changes the level of the MCLR/VPP pin from the programming voltage to the disable (low) level. This then allows the '690 to run for a short time before being reset. My original code sent a few characters at the beginning of my program, immediately after the initialization but before attempting to receive characters. Thus this short delay before reset allowed the code to run and all of the characters in my init routine to be sent, but disabled the chip before I could receive characters from the PC. So you can see how I (erroneously) assumed transmit was working but not the receiver. To test, I changed the code to infinite loop sending characters, and saw that a certain number were sent (and more than my original code, unfortunately) after programming but before the program was halted by the MCLR assertion from the PICkit2. Manually changing the MCLR level started and stopped the infinite loop as expected. So there is no bug (whew!) and a painful lesson has just been learned. Hopefully these emails will help prevent someone else from suffering as I did! Thanks again for all of your help, Tom Tom Cassidy wrote: > Good point. I have only the PICkit2 programmer connected to the MCLR > pin, so I explored that issue a bit more. > > Turns out that the MPLAB allows one to manually set the MCLR pin level > and that mine was set to "Vil," which is a low logic level. > > Now if I run my "bad" code but tell MPLAB to set MCLR to Vdd, it runs > correctly and receives characters. So that solves the problem of why my > receiver wouldn't work- I was actively resetting the chip with the MCLR > signal after programming. (Sure wish they had a visual indicator of > what the setting was, instead of just two push buttons!) > > I still question why, even in the case when MCLR was being asserted, the > chip ran code and transmitted characters. Just re-read the spec and it > says that the PCL register is set to 0 on a MCLR reset. Seems like that > should halt execution as long as MCLR was asserted... > > Thanks, > Tom > > > Kevin Jones wrote: > >> >> >>> (_MCLRE_OFF allows reception, _MCLRE_ON prohibits reception.) >>> >>> >> So basically, you are saying that if you use the internal reset >> circuitry in the chip you receive ok, if you use an external reset >> circuit it does not. This would imply to me that your external reset >> circuit is faulty or out of spec. What exactly to you have hooked up >> to the MCLR pin ? >> >> Regards, >> Kevin Jones >> >> >> >> -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist