Do you inadvertently have the watchdog timer enabled? Regards, Jim On Wed, 16 January 1980, sep wrote: > > Hello, > [RE: "help me please!!" messages] > > > To refresh memmory I am running the following code: > ------------- > Main > MOVLW h'06' ; turn on an LED and a motor (h-bridge) > MOVWF PORTB > NOP > > WaitHere > CALL Delay2 ; simply delay a little (it runs ok!) > BTFSC PORTA,1 ; if pin 1 of porta goes high... turn everything off > GOTO Finish > GOTO WaitHere > > Finish > CLRF PORTB ; NEVER PASSES THIS STAGE SINCE IT IS RESETING! > > dodod ; loop doing nothing > NOP > CALL Delay2 > GOTO dodod > > END > -------- > > Well, what is happening is that the motor and an LED are turned and remain > on as long as the pin 1 on porta remains low. That is all good. The > problems happen when I turn the pin 1 on porta to high, the motor and the > LED seem to stop. BUT then a reset happens to the chip and hence it > oscillates, and never stopping. > > NOTE: motor is controlled by H-bridge (74F139) > > I don't want the chip to restart when the motor is turned on! I am propably > doing something wrong! > > At the momment I have MCLR of the PIC through a 1K resistor to high, and an > 0.1 capacitor to a low. The Vdd is connected to a high. Vss is connected to > a low. > Across my 5V regulator I have a 1000uF capacitor. > Across the Vdd and Vss I have connected a 0.1uF cap. > > NOTE: the motors only require 2V, >30mA to run. > > I have checked all of the voltages on both the chips and they are both at > 5V. > > Can someone help me in setting the circuit up such that PIC does not reset! > I need to get this running by tonight, and I am having no luck. > > I will continue to test and if I get any progress I will let the list know, > but so far I have been having no reset. > > I thank everyone for the help. > > ------------- > Sep. S. > me@sep.2y.net > ----------- jim@jpes.com