Above the main problem


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2016
    Location
    Plainfield, Illinois
    Posts
    73

    Default Above the main problem

    I need to set a pin low on intialization or it floats or drives high. I set the pin low before the main, but the program seems to continue to go thru the code above the main even though my last line is goto main.

    I tested this by putting a flash led above the main and it flashes after it enters the main

    What I am I not doing to prevent this?

    thanks ahead of time....

    16F15324

    INLVLA = %11111

    OUTPUT PORTA.4 ' FET

    FET VAR PORTA.4 ' FET

    low fet

    main

    goto main
    Last edited by pescador; - 30th May 2023 at 23:34.
    My dad never liked you...

  2. #2
    Join Date
    Apr 2016
    Location
    Plainfield, Illinois
    Posts
    73


    Did you find this post helpful? Yes | No

    Default Re: Above the main problem

    lets simplify


    Is it possible for the program to come out of the main loop other than a reset?

    main

    code

    goto main
    My dad never liked you...

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default Re: Above the main problem

    Yes it can.

    Can you describe what you really want to do?

    Ioannis

Similar Threads

  1. LED Blinking while main does something else
    By dwright in forum FAQ - Frequently Asked Questions
    Replies: 12
    Last Post: - 6th July 2015, 07:26
  2. AC main monitor
    By tallen in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 25th August 2009, 16:23
  3. GOTO main or RETURN - Question
    By studysession in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st January 2009, 16:13
  4. Replies: 32
    Last Post: - 23rd March 2007, 04:01
  5. letal delay in the main routine
    By lutherblissett in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th November 2005, 21:22

Members who have read this thread : 13

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