Christian, ----- Original Message ----- From: Christian Dorner To: Sent: Wednesday, December 19, 2001 8:49 AM Subject: Re: [PIC] Ghost in my PIC | Hi! | | | > This is nosense. The SFR's are initialized to their default values on | reset. | | You call it "nonsense" i would say "expecpt the unexpected". | | Yes, you're right, the datasheet tell us the default values on reset. But | when you see a pic jumping into the interrupt routine befor the init-code | sets the GIE then something must be wrong. | | Bob Barr wrote this (unexpected values in the FSR's) could caused by an | unproper reset. I agree with him, because in my case it was a really | "quick and dirty" design on a protoboard. (no cap's on the power lines, | cheapish switch to power on/off the board, and so on =:-) | | After i inserted the CLRF INTCON to the ofs 0x00 the problem was gone. This sounds very strange, although i've heared things like this many times. I never had problems with reset on PIC's, and i discard this possibility. Think that if this problem is real, MChip could have serious legal troubles with large companies using PIC's in their products. It's very arbitrary supposing that some SFR's are wrong initialized while others are well initialized, since all uses the same hardware initialization configuration. And if we suppose that all the SFR's are randomly (or simply wrong) initialized, then also the PC will initialize with some value other that 0, so your program will start anywhere, and that's what i say is nonsense to load manually some special function registers inmediatly below the reset vector. This situation of random values on (all) SFR's is what usually happens when the application works under a very noisy EM environment, every time the noise is strong enough to affect the SFR's (and GPR's...), and the only firmware "solution" is to enable and use correctly the WDT. Best Regards, S.- -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics