Hi, ----- Original Message ----- From: Christian Dorner To: Sent: Tuesday, December 18, 2001 5:48 AM Subject: Re: [PIC] Ghost in my PIC | Hi! | | | > I have a very strange thing happending with my PIC. | > I mounted it in a proto-board and recorded a simple programa. | > At first it doesn't work. | > Waiting aprox. 1 minute, it beguins to work (sometimes). | > Sometimes, when I touch GND, it works again. Sometimes, not. | > It works when it wants... | | I can remember at the beginning of my PIC expirience i had a similar | problem. In my case i could solve it with a better startup routine like | this: | | org 0x0000 | | clrf PCLATH | clrf INTCON | clrf STATUS | goto start ; Jump to Program entry point | | It seems that the PIC sometimes starts up with unexepted values in some | registers. If your program don't use interrupts then add a RETFIE at offset | 0x0004 to let the program countinue even when a unexepted interrupt occures. | | Christian This is nosense. The SFR's are initialized to their default values on reset. Best Regards, S.- -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads