PIC resets every now and then


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2007
    Posts
    66

    Default PIC resets every now and then

    My pic 16F73 resets every now and then.
    I am using a 20MHz external crystal with 2 x 22 pf capacitors.
    I also have a 10K resistor between between MCLR and +5V.
    Even if I scale down my program to a few lines consisting only of output to the LCD, my pic still resets every now and then.
    I have followed Darren Taylors advice and have sent the output of the
    POR, BOR, TO and PD bits to the LCD just after initialization, as to help to determine what cause the resets.
    The values after each reset is as follow:
    POR=0 (Power-On reset PCON.1)
    BOR=0 (Brown-out reset PCON.0)
    TO=1 (Time-out bit STATUS.4)
    PD=1 (Power-down bit STATUS.3)

    Using the above values as a clue, what could be the problem?
    Accortding to the datasheet, POR=0, BOR=unknown, TO=1, PD=1 indicates it was a Power-on-reset.
    This doesnot make sense. How can a Power-on reset happen 10-30 seconds after startup?
    Last edited by passion1; - 10th June 2007 at 18:16.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Lightbulb Electrical scheme ... please !!!

    All is in the title ...

    just Thanks missing ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    May 2007
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    AceTronics

    My circuit looks exactly like the one on p.96 of the PBP manual that shows the default setup for connecting a LCD. (except for the fact that I am using a pic16f73 and a 20MHz crystal).

    Thus default connections for LCD.

    DEFINE OSC 20

    DEFINE LCD_DREG PORTA
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3

    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 4
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    DEFINE NO_CLRWDT 1 ' Don't insert CLRWDTs

    TRISB=0 ' PORTB is output

    ADCON1 =7 ' PORTA is digital


    Thanking you in advance for any help or suggestions!
    Last edited by passion1; - 10th June 2007 at 20:03.

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I would -

    Add a 10uF tantalum cap very near the PIC between Vdd and GND. I would also lower the pull-up on MCLR to 4.7K.
    Charles Linquist

  5. #5
    Join Date
    May 2007
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Charles

    The 10uF tantalum cap very near the PIC between Vdd and GND solved my problem!

    Thanks so much!!

Members who have read this thread : 1

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