Hi ! Wherever the supply comes from, never have any "open CMOS inputs" ! If PORTA are inputs, and are un-connected, that *might* produce the effect you are seeing. How is MCLR handled. When conncted to the PICkit2, the PICkit2 manage the MCLR pin, but how is it handled when connected to the "power supply" ? Jan-Erik. Jacopo Monegato wrote 2011-09-26 22:33: > > Well, PORTA, but the program actually skips that part at the moment.... > I think the crucial point is that the problem comes when i connect the > PIC to the power supply instead of the PICkit > >> Date: Mon, 26 Sep 2011 22:22:10 +0200 From: >> jan-erik.soderholm@telia.com To: piclist@mit.edu Subject: Re: >> [PIC]PIC18F2550A, Pwm doesn't work when using on external power >> supply >> >> >> >> Jacopo Monegato wrote 2011-09-26 18:57: >>> >>> but if i touch to some random and unconnected parts... >> >> Are those "unconnected parts", parts of the PIC ? This sounds as a >> open-CMOS-input problem. Do you have any I/O pin that are inputs >> (which is the default if you do not config them at all) and not >> connected to anything ("open") ? >> >> Jan-Erik. -- http://www.piclist.com PIC/SX FAQ& list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .