Problem with 16F877A but not with 16F876A


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302

    Default Problem with 16F877A but not with 16F876A

    I have use the 16f876a for a frequency meter (base on AN592), and works fine.
    Yesterday i test the same programm with 16f877a but not work and i don't why.

    My configuration is:
    ' PIC16F877A
    ' Xtal 4MHZ

    CMCON = 7 ' PortA = digital I/O
    ADCON0 = %11100001
    ADCON1 = %10000000
    TRISA = %11111111

    The same configuration work with 16F876A.
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Question

    Hi, Savnik

    did you verify the quiescent state collector voltage meets PIC input specs ???

    I feel the problem in the Trans. hfe and not in the Pic ....

    Alain
    Last edited by Acetronics2; - 15th May 2008 at 09:55.
    ************************************************** ***********************
    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
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Savnik

    did you verify the quiescent state collector voltage meets PIC input specs ???

    I feel the problem in the Trans. hfe and not in the Pic ....

    Alain
    I use BF199 and not 2N3904(as show at picture).
    The same circuit work on 16f876a.
    I believe the problem is with the configurations

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by savnik View Post
    I use BF199 and not 2N3904(as show at picture).
    The same circuit work on 16f876a.
    I believe the problem is with the configurations
    BF 199 has a "special" pinout ( b-e-c )... not the same as 2N3904 ... if my souvenirs are good ...

    and hfe is far lower than the 3904 ... ( I've just measured ~ 50 @ 2.5 ma on some of mines )


    the Only differences between 876 and 877 is the Port number ... as you do not use PORTD and PORTE ( I hope ...) , you can directly program the 877 with the 876 Hex !!!

    Alain
    Last edited by Acetronics2; - 15th May 2008 at 12:33.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  5. #5
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    The bf199 work with 16f876a.
    I have spent many hours with no result.

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


    Did you find this post helpful? Yes | No

    Default

    I'm surprised it works with a 16F876a looking at the current ADCONx settings...
    Steve

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

  7. #7
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    I'm surprised
    Why;
    Where i am wrong with ADCONX

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by savnik View Post
    Where i am wrong with ADCONX
    Because you've got digital signals going into a port configured for analog input...

  9. #9
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Because you've got digital signals going into a port configured for analog input...
    with 16f876a i use ra0-ra1-ra2-ra5 as analog and ra3-ra4 as digital , and with those configurations work very well.But with 16f877a not.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by savnik View Post
    with 16f876a i use ra0-ra1-ra2-ra5 as analog and ra3-ra4 as digital , and with those configurations work very well.But with 16f877a not.
    Well, you didn't tell us that now did you?

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


    Did you find this post helpful? Yes | No

    Default

    Refer to ADCON1 register table
    http://ww1.microchip.com/downloads/e...Doc/39582b.pdf
    page 130

    The way you have it right now, all AN inputs are analog.
    Steve

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

Similar Threads

  1. Problem displaying data from GPS module & using 16f877a
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 15th April 2010, 10:27
  2. 16F876A Bootloader Problem
    By Ashleyr01 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th April 2009, 18:21
  3. 16F877A problem: "coupled" digital values
    By Lupo83 in forum General
    Replies: 16
    Last Post: - 4th December 2007, 12:46
  4. 16F877A serin problem with baud rate 19200
    By leemin in forum Serial
    Replies: 1
    Last Post: - 31st July 2005, 09:45
  5. Replies: 11
    Last Post: - 13th July 2005, 19:26

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