Both of you are absolutely right! I just talked with a colleague of mine who is kind of a PIC guru. The first thing that he said was "what is your oscillator setting?" Well, I didn't pay much attention to it when I was programming, so I just used the "INTRC" switch from the programmer software. And I suspect this could be the culprit. Wish I had an oscilloscope. But I will do the cheapo test with the blinking LED (actually this is another thing my colleague suggested ...... smart men think alike, eh?).
I will also try a 4-MHz crystal that I have sitting at home and use the XT switch when I program the PIC next time. Bruce, thanks a lot for the offer to send me the used sensor. It was very kind of you. But let me run these tests first and I will let you know.
Bookmarks