What is causing my problem?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352

    Default What is causing my problem?

    Hello all!
    It’s been a long time since I’ve posted here but I’ve still stayed in touch. I just made a project using a 16F87 and set 2
    Outputs to 0 and I am getting voltage out of the pin that’s enough to turn the output transistors on. Can anybody give me a reason why a zero on a pin is not a zero? The original project I made back in 2005 was done with a 16F84a and is suppose to be pin compatible with the F87. The original project still works fine but I need another. Help, please!
    Thank you, BobK

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    Is it possible you did not set the TRISx register (where x is the port name) ? Perhaps the pin is an analog one by default and you haven't configured it for digital use?

    these are what I can think of just now.

  3. #3
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    Thank you for the fast reply, Jerson.
    I have 2 inputs on port A and the Tris A is =00000011 and the outputs are on port B and the Tris B is =00000000. I have the comparators disabled with CMCON = 7. Is there something missing here? Thank you!
    BobK.

  4. #4
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    ... set outputs to 0 and I am getting voltage out of the pin that’s enough to turn the output transistors on.
    What voltage are you measuring? Which PORTB pins are you using?

  5. #5
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    Related to PORTB, I can see that only the ANSEL register is different.

    I have some doubt if the ANSEL needs to be set to 0 on this chip.

    If that does not help, then perhaps you can try by disconnecting the driven load and check if the outputs are following your code intent.

  6. #6
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    PORTB has no analog functions on the 16F87.

    Have you disabled the WDT?

  7. #7
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    No I did not disable the WDT. Is that necessary?
    Last edited by BobK; - 11th July 2022 at 15:50.

Similar Threads

  1. Replies: 5
    Last Post: - 5th January 2018, 13:46
  2. Argument out of range - how to find what is causing it?
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2011, 02:00
  3. Fan causing noise in audio circuit
    By The Master in forum Off Topic
    Replies: 11
    Last Post: - 28th August 2011, 11:47
  4. MCLR causing trouble . .
    By shahidali55 in forum General
    Replies: 10
    Last Post: - 21st December 2007, 12:20
  5. Issue with Array causing PauseUS to have 16uS overhead
    By bcd in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th November 2007, 08:41

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