Searching \ for 'Novice ques. about WDT' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=novice+ques+about
Search entire site for: 'Novice ques. about WDT'.

Truncated match.
PICList Thread
'Novice ques. about WDT'
1997\10\13@112240 by Scott Horton

flavicon
face
I have a working LARGE 2 digit LED display I made using a 16C84 and some TI
power shift registers.  I send serial data to it from my pc and it displays it.
It's been in use many hous with no problem until yesterday, when it "locked".
A power cycle fixed it but I want to make it "self healing" if possible.

Can I use the WDT to "reboot" it?  I had invisioned having the WDT timer
running and putting lots of resets to the WDT in my code.  Then, if it gets
stuck, the WDT timer will time out and trigger a reset of the 16C84?

Is this how it works?  Can someone offer me some pointers on how/if I can make
the WDT reset the chip?

Thanks in advance for all help.

Scott Horton
Nashville, TN

1997\10\13@115327 by Harold Hallikainen

picon face
On Mon, 13 Oct 1997 10:21:38 -0600 Scott Horton
<spam_OUTScott.Horton1TakeThisOuTspamBRIDGE.BST.BLS.COM> writes:
>
>Can I use the WDT to "reboot" it?  I had invisioned having the WDT
>timer
>running and putting lots of resets to the WDT in my code.  Then, if it
>gets
>stuck, the WDT timer will time out and trigger a reset of the 16C84?


       Tha'ts exactly how it works, but I suggest putting just one
CLRWDT in the code at the end of the main loop (assuming the WDT doesn't
time out before it gets around the loop).  Putting a bunch of CLRWDTs in
your code may result in the processor getting lost somewhere and STILL
finding a CLRWDT.

       Here's some of my cut up code for the 16c74a.


Harold


start
       movlw   b'00001111'
       bank1                   ;
       movwf   option_reg      ; Port b weak pull-ups enabled
       bank0                   ; External interrupt on falling edge
                               ; Timer 0 uses internal clock
                               ; Timer 0 increments on positive edge
                               ; Prescaler assigned to WDT
                               ; WDT prescaler=128
       movlw   b'01100000'     ; Disable global interrupts for
now
                               ; Enable un-masked peripheral interrupts
                               ; Enable timer 0 interrupt
                               ; Disable external interrupt
                               ; Disable port B change interrupt
                               ; Clear various interrupt flags
       movwf   intcon
       movlw   b'00100000'     ; Disable parallel slave port
interrupt
                               ; Disable A/D interrupt
                               ; Enable async serial receive interrupt
                               ; Disable async serial transmit interrupt
                               ; disable synchronous serial port
interrupt
                               ; Disable Timer 1 capture/compare
interrupt
                               ; disable timer 2 interrupt
                               ; disable timer 1 interrupt
       bank1
       movwf   pie1
       bank0
       call    InitPorts       ; Set up data direction registers
       call    Init_serial     ; Set up serial port
       call    initDmxRam      ; Set up dmx pointers, etc.
       call    ClearRamPort    ; Go clear ram port
       clrf    mptl
       clrf    mpth            ; Clear move pointers
       movlw   0xff
       bank1
       movwf   trisb           ; Set port b as input to read
jumpers on RamPort
       bank0
       comf    portd,0         ; Convert active low to active
high Row1StartChan in W
       movwf   Row1StartChan   ; and save it
       bsf     portc,3         ; Make sure RamPort clock is
high
       bsf     portc,4         ; and deselect memory, passing
thru port
       comf    portb,0         ; Get row2 jumper settings
thru RamPort and invert (active low)
       movwf   row2StartChan   ;  If we have 2 rows of 12
pots, Row2=13
       EnableIRQ               ; enable interrupts
Loop
       clrwdt
       call    XferData        ; Transfer received data and A/D to
transmit buffer
       goto    loop

1997\10\13@121332 by Herbert Graf

picon face
-----Original Message-----
From: Scott Horton <.....Scott.Horton1KILLspamspam@spam@BRIDGE.BST.BLS.COM>
To: PICLISTspamKILLspamMITVMA.MIT.EDU <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Date: Monday, October 13, 1997 11:26
Subject: Novice ques. about WDT


>I have a working LARGE 2 digit LED display I made using a 16C84 and some TI
>power shift registers.  I send serial data to it from my pc and it displays
it.
>It's been in use many hous with no problem until yesterday, when it
"locked".
>A power cycle fixed it but I want to make it "self healing" if possible.
>
>Can I use the WDT to "reboot" it?  I had invisioned having the WDT timer
>running and putting lots of resets to the WDT in my code.  Then, if it gets
>stuck, the WDT timer will time out and trigger a reset of the 16C84?
>
>Is this how it works?  Can someone offer me some pointers on how/if I can
make
>the WDT reset the chip?


   Yes, AFAIK that is how it works, if your code goes who knows where the
WDT times out and resets the chip. BTW, do you have a brownout protection
circuit, a brown out of the power supply might cause what you describe, if
you keep on getting the problem, experiment with adding brownlout
protection, it might solve your problem. Another cause of the problem might
be an OSC problem, your oscillator might be stoping or something, check the
app not from microchip and see if that might help. TTYL

1997\10\14@014048 by tjaart

flavicon
face
Scott Horton wrote:
>
> I have a working LARGE 2 digit LED display I made using a 16C84 and some TI
> power shift registers.  I send serial data to it from my pc and it displays
it.
{Quote hidden}

The trick with the WDT is to have as little 'tags' (CLRWDT) as possible.
Try to
have only one if you can in a place where you know the program is OK if
it can
pass through that point. If you have too many tags, you defeat the whole
object,
and may only succeed in introducing new unknowns.

--
Friendly Regards

Tjaart van der Walt
EraseMEtjaartspam_OUTspamTakeThisOuTwasp.co.za
_____________________________________________________________
| WASP International http://www.wasp.co.za/~tjaart/index.html |
|       R&D Engineer : GSM peripheral services development    |
|   Vehicle tracking | Telemetry systems | GSM data transfer  |
|    Voice : +27-(0)11-622-8686 | Fax : +27-(0)11-622-8973    |
|              WGS-84 : 26010.52'S 28006.19'E                 |
|_____________________________________________________________|

1997\10\14@191436 by Frank Schmalz

flavicon
face
At 10:21 13.10.97 -0600, you wrote:
>I have a working LARGE 2 digit LED display I made using a 16C84 and some TI
>power shift registers.  I send serial data to it from my pc and it
displays it.
>It's been in use many hous with no problem until yesterday, when it "locked".
>A power cycle fixed it but I want to make it "self healing" if possible.
>
>Can I use the WDT to "reboot" it?  I had invisioned having the WDT timer
>running and putting lots of resets to the WDT in my code.  Then, if it gets
>stuck, the WDT timer will time out and trigger a reset of the 16C84?
>
>Is this how it works?  Can someone offer me some pointers on how/if I can
make
>the WDT reset the chip?
>
>Thanks in advance for all help.
>
>Scott Horton
>Nashville, TN
>

Hi,
thats exactly how it works.
put a command like :
       __CONFIG _WDT_ON&_CP_OFF     ; Set up config bits
in your asm file just after the "include        <P16C84.INC>" instruction.
this would set WDT timer on and Code protection off.
Or you set it up correctly in your programmer window.
I don't know about the 16C84 but usually you have an additional postscaler.
- Nice feature, gives you a little more time.
Yes, and then it's exactly how you said. You calculate your cycles, until
the WDT will run out, you count your instructions, and you insert a CLRWDT
just before the WDT runs out.
Do not put a CLRWDT in the loops where you are waiting for responds. But,
you know that.
should the WDT run out it will reset your pic.
That's all.

Bye

Yours,
         Franky X.
^^^^^^^^^^^^^^^^^^^^^^^^^^schmalzspamspam_OUTmailserv.rz.fh-muenchen.de

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