I've got some replays on this one now, and the problem is solved. A 100nF cap in parallell with the motor solved all the problems with power glitches and filtered away most of the noise. Mvh Stein > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Stein Sem-Jacobsen > Sent: Friday, April 21, 2000 3:43 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: 5C gets resett when driving load > > > I've set up an 16F84 to drive a DC motor. In order to do that > I've hooked up an 330ohms resistor to the base of an BC368. Its > emitter goes directly to ground and the motor is wired with a > protection diode to Vcc - 5V. When attaching a LED instead of the > motor, it works fine. > > When I drive the otput to high, it seems like the device gets > reset. I've noticed a little voltage swing when it turns on. > Further I've noticed that the port doesn't go all the way to Vcc, > instead of 5V output, I get 3,5V to the resistor. But there isn't > any overload of the port either, it can't get that much through a > 330oms resistor. I can't figure out why it doesn't work. > > The only thing I can think of is that the port short circuit the > Vcc to Gnd... I've tried several µC and I've wired it both on a > PCB and with wires. > > I've put up a schematic here. > http://home.sol.no/~ssemjaco/images/problem.gif The voltage > regulator is set up to output 3V (other resistors than in the > schematic), but it acts all the same on 5V (notice: "LF" PIC) > > Regards > Stein Sem-Jacobsen > >