I think i found the problem. I didn't realize i had to put a capacitor betw= een Vusb and Vss, even if i didn't use USB. > From: jack.monegato@hotmail.it > To: piclist@mit.edu > Subject: [PIC]PIC18F2550A, Pwm doesn't work when using on external power = supply > Date: Mon, 26 Sep 2011 18:57:02 +0200 >=20 >=20 > Hello there, > I have quite a big problem. I am building a sound synthesizer using a 18F= 2550 as tri/sqr wave generator. Wrote the program, tested on breadboard, tr= ansfered to board, tested on board (with PICkit 2)... everything just PERFE= CT. >=20 > I also built a 12 to 9 to 5 V power supply by putting in series a 7809 th= en a 7805, it works, the voltages are what they should be (9V is for the an= alog part of the circuit), I can hear the square wave but not the triangula= r (from PWM output). PWM seems not to work. but if i touch to some random a= nd unconnected parts (i.e., the sixth pin in the programmer dock) I can hea= r, at lower than expected frequency, another square wave, from the pwm outp= ut. Then if i unplug the external supply and plug in the PICkit i have to t= urn on then turn off then turn on and ONLY after that the pic start working= properly again. >=20 > Unfortunately i don't have any measurement tool but a multimeter and a st= einberg sound card (as sound analyzer). The voltmeter dysplays 4.62V when w= ith PICkit and 5.02V when power supply >=20 > Any suggestion? I already changed a couple of capacitors in the supply ci= ruit, but nothing changed. the circuit is: >=20 > ______ |->+9V ______ > 12VDC --+------+------| 7809 |---+------+-----+-----| 7805 |---+------+--= --> +5V > | | |______| | | | |______| | | > =3D 100uF=3D 0.1uF | =3D 0.1uF=3D 100uF=3D0.1uF | = =3D 0.1uF=3D 47uF > | 40V | | | | 40V | | | | 1= 0V > 0V --+------+----------+------+------+------+--------+------+------+--= --> GND > =20 > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist =20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .