Searching \ for 'prevent unwanted reset (used to be "Help me please' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=prevent+unwanted
Search entire site for: 'prevent unwanted reset (used to be "Help me please'.

Truncated match.
PICList Thread
'prevent unwanted reset (used to be "Help me please'
2000\02\22@153530 by sep

flavicon
face
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.
spam_OUTmeTakeThisOuTspamsep.2y.net
-----------

2000\02\22@154926 by John A. Craft

flavicon
face
<x-flowed>I would suggest turning off the watchdog timer or clearing it from time to
time.

John C.
At 03:34 PM 01/16/1980 -0400, you wrote:
{Quote hidden}

</x-flowed>

2000\02\22@160235 by sep

flavicon
face
Hello,
Sorry I forgot to mention the watchdog timer is off.
here is the initialization of the code:
--------
#include "P16F84.INC"           ; Include header file

       LIST P=16F84, R=DEC     ; Use the PIC16F84 and decimal system

       __config  _RC_OSC & _WDT_OFF & _PWRTE_ON

and the rest of the code is as posted.
-------

----------
> From: John A. Craft <craftspamKILLspamNCS-SSC.COM>
> To: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
> Subject: Re: prevent unwanted reset (used to be "Help me please!!")
> Date: Tuesday, February 22, 2000 4:45 PM
>
> I would suggest turning off the watchdog timer or clearing it from time
to
{Quote hidden}

runs ok!)
{Quote hidden}

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.
> >EraseMEmespam_OUTspamTakeThisOuTsep.2y.net
> >-----------

2000\02\22@160900 by Rob Bakker

flavicon
picon face
have you put a 'scope on _MCLR_   I had a similar problem with noise from a
motor on the main power rail - this was enough to reset the PIC

hope this helps

RoB>)

2000\02\22@161726 by James Paul

flavicon
face
Do you inadvertently have the watchdog timer enabled?

                               Regards,

                                 Jim



On Wed, 16 January 1980, sep wrote:

{Quote hidden}

@spam@jimKILLspamspamjpes.com

2000\02\22@203040 by sep

flavicon
face
Hello,

I have tested the H-bridge of off the circuit (with the PIC removed) and it
is operating just fine given one of the two combinations for each motor
(1,0) & (0,1).

Now, I became suspicous of my circuit and took the pic over to a breadboard
and did a few tests. The following is run:
--------
Start
Initialize
       CLRF    PORTA           ; initialize porta
       CLRF    PORTB           ; initialize portb

       ; move into bank 1
       BSF     STATUS,RP0      ; Select bank 1 (bit #RP0 from the status register)
       CLRF    TRISB           ; Select Output on all PORTB bits
       MOVLW   0x1F            ; set all 5 input pins as INPUT
       MOVWF   TRISA           ; put this into effect into porta
       BCF     STATUS,RP0      ; Select bank 0 (always remember to come back!)
       CLRF    PORTB

Main
       CALL    Delay2
       MOVLW   h'02'
       MOVWF   PORTB

-----------

All that works just fine, but the following code never gets run:

-----------
AAA     CALL    Delay2
       MOVLW   h'04'
       MOVWF   PORTB
       CALL    Delay2
       GOTO    Main
       END

---------

And hence I create a flashing LED on portb<1>. This obviously means that it
gets to the location AAA and resets?
But the MCLR is connected on the breadboard to a 4.7K resistor to the 5V
regulated.

So, as I can see it I don't see what the heck the problem is. Watchdog is
turned off at the beginging of the code. The motors are not the problem
since it operates the same with or without the motors. (BTW, these motors
are tiny 1.4 cm long!!)

I am coming down to the conclusion that maybe my PIC is fried but it seems
to be burning fine and veryfing in the programmer. (I don't have another
F84 available!!)

If you can help please help. I am going to stay up all night to get it
running for my presentation tomorrow.

Thanks alot.

--------
Sep S.
KILLspammeKILLspamspamsep.2y.net
--------

2000\02\22@232552 by Gennette Bruce

flavicon
face
Uhm, some of the early memory positions are very special and should be
jumped over *BEFORE* the start of your code.

Put the line -
org     06
in front of your Start statement to cause your program origin to be the 6th
program word.

Note - position 04 is the interupt vector, so when an interupt occurs the
program jumps to this point where the author *SHOULD* have put a   GOTO xxx
to handle the interupt.  Your program probably loops back to the CLRF
TRISB  statement, then continues on turning the LED back on, then another
interupt (from who knows where) occurrs throwing the program back to
statement 04 . . . .

Just some thoughts.

Bye.

> {Original Message removed}

2000\02\23@114603 by w. v. ooijen / f. hanneman

picon face
> So, as I can see it I don't see what the heck the problem is. Watchdog is
> turned off at the beginging of the code. The motors are not the problem

I hope you mean that the watchdog is disabled in the configuration word?
Wouter

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...