Mysterious Reset


Results 1 to 25 of 25

Threaded View

  1. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    There are 4 bits that indicate what caused a RESET.
    Code:
    POR	Power-On Reset	PCON.1
    BOR	Brown-out Reset	PCON.0
    TO	Time-out bit	STATUS.4
    PD	Power-down bit	STATUS.3
    This table from the 16F818/819 datasheet shows the values of them after various reset conditions.
    You can send them to an LCD or RS232 terminal to determine what happened.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1398&stc=1&d=117185912 4"></img>

    BOR/POR must be set manually to detect a Brown-Out Reset. See datasheet section 12.9

    Also, if changing the value of OPTION_REG in your program. Be aware...
    Quote Originally Posted by PIC16F818/819 Datasheet
    Note: To avoid an unintended device Reset, the instruction sequence shown in the
    “PICmicro® Mid-Range MCU Family Reference Manual” (DS33023) must be
    executed when changing the prescaler assignment from Timer0 to the WDT. This
    sequence must be followed even if the WDT is disabled.
    My guess would be something to do with the relays. Possibly back EMF feeding to the power supply.

    And, even though you've got a HUGE capacitor on the power. You should still have a 0.1uf cap from VDD to VSS as close as possible to the chip.

    Another possibility is a Stack Under-Flow. An Over-Flow won't do it, but an Under-Flow (Return without a Gosub) can cause it to jump to address 0000. It looks like a reset, but isn't. But you can see that from looking at those 4 bits.

    HTH,

    P.S. That's pretty weird sending sound thru 4 different bushes.
    <br>
    Attached Images Attached Images  
    DT

Similar Threads

  1. IC12F508 with Internal Oscillator and Software Reset
    By karan123 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd October 2009, 16:13
  2. pic reset sometimes
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 23rd January 2008, 17:27
  3. Mysterious Reset Revived!
    By JoelMurphy in forum General
    Replies: 8
    Last Post: - 16th May 2007, 00:26
  4. reset and interrupt vectors
    By dtoohey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th February 2005, 22:02
  5. Replies: 5
    Last Post: - 1st December 2004, 12:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts