PIC keeps resetting when executing subroutine


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Dec 2003
    Location
    WI
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    I will try this tonight when I get home from work.

    I had commented the ADCON out when I switch from a 16F819 to a 16F84A. The 84A does not have a A/D conveter.

    Having the TRIS commented or uncommented did not make a difference.

    If I cant get this to work I will switch to a SX28 processor. I have the code working on my DEV board with LED's with SX/B.

    Jason

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,838


    Did you find this post helpful? Yes | No

    Default

    It is absolutely necessary to define the state of the Inputs and Outputs. On Reset the controller set all pins as inputs.

    Give special attention as to which pins you define inputs and outputs. There are cases that pins are not only inputs but set as analog input too!

    So,

    1. Read with extreme attention to the details the datasheet for the MCU you use.

    2. Set if any analog/comparator inputs accordingly

    3. Set the pins as inputs and outputs (unused as outputs and unconnected)

    Ioannis

  3. #3
    Join Date
    Dec 2004
    Location
    USA
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Have you disabled the watchdog timer?

  4. #4
    Join Date
    Dec 2003
    Location
    WI
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Got it working. Thank's Ioannis and every one else. It must have been stack overflow. I'm getting rusty. Used to do 5 or 6 PIC projects a year but haven't done one in 2 years.

    Jason

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,838


    Did you find this post helpful? Yes | No

    Default

    You are welcome.

    Ioannis

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  3. PIC chip resetting. Very weird
    By The Master in forum Off Topic
    Replies: 0
    Last Post: - 28th October 2007, 17:07
  4. Pic resetting
    By malc-c in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 1st January 2007, 21:00
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

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