PIC 16f877a


Closed Thread
Results 1 to 9 of 9

Thread: PIC 16f877a

Hybrid View

  1. #1
    Join Date
    May 2011
    Posts
    17

    Default PIC 16f877a

    Hi

    I have a very strange problem with PIC 16F877A, When I enter program into the PIC and plug PIC into circuit board and turn on the switch, everything is normal and work like it should work. But when I turn off the power and after few sec I turn it ON, PIC doesnt work corectly.

    For example:
    WHen I plug him after programing, my motors moves acording to AD conversion, but when I turn it off, and after a short period when I turn it ON, PIC reads another values from AD ?

    thx

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: PIC 16f877a

    Various thing may do that, but I would suggest to enable the Brown-Out detect, and Power On Timer config fuses and see how better/worst it is from there.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: PIC 16f877a

    The schematic could help to understand better. Can you post it?

    Cheers

    Al.
    All progress began with an idea

  4. #4
    Join Date
    May 2011
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: PIC 16f877a

    HI

    here is the schematic:



    I have tried to enable BOD, and these are results:

    When I insert PIC into Board and turn the switch on, program run correctly, but when I turn the switch off and let it be offline few min, then when I turn it on it want work, BUT when I turn OFF the switch and Take out PIC from board and Plug him back to board, and turn the switch ON program runs correctly ?
    So every time I Remove it from board and plug him back program works
    Last edited by Archangel; - 21st May 2011 at 19:25.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: PIC 16f877a

    Slow slope power-on/Power off PSU behaviour.

    You want to test the BOR, PD bits at the start of the program then.

    Check the datasheet for STATUS, PCON register
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    May 2011
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: PIC 16f877a

    I am lil bit confused now ?? how to chack that ?

  7. #7
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: PIC 16f877a

    What is the state of all the unused and floating pins ? Are they outputs or inputs ?
    If you have them set (tris setting) as input then turn them into output and clear them to zero.

    Never leave inputs floating without pullup or pulldown.

    Cheers

    Al.
    All progress began with an idea

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