What is causing my problem?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    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?

  2. #2
    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.

  3. #3
    Join Date
    Aug 2011
    Posts
    453


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    If you don't disable it you'll be getting resets when the wdt times out.
    That'll set the pins as inputs, so they'll be floating instead of low.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    For trouble shooting purposes, sure try disabling it but I'd be very surprised if has any impact on the issue.
    Generally speaking, you don't need to disable the WDT. Unless you're code includes the line DEFINE NO_CLRWDT 1 PBP adds code to reset it periodically so it should not time out during execution.
    If the WDT does time out and resets the PIC then yes, the TRIS bits gets set back to 1 but the code starts to execute from the beginning where one usually has it's initialization code to, for example, clear TRIS. In that case, yes, the pins does float but only until the the uC executes the TRISB = 0 again.

    As have been suggested, disconnect the load from the I/O pin and measure the voltage on the pin and on whatever connects to the pin (which is now floating).

    Post a schematic of the circuit and the shortest piece of code you can come up with that still shows the issue.

  5. #5
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: What is causing my problem?

    I had a similar experience with some PIC18F45K22 dip-40 parts I had laying around for many years. I couldn't get clean digital outputs to the point where things didn't work properly. After spending way too much time trying different things, I swapped in a K40 part and it worked perfectly. I therefore concluded that the K22 parts were defective. Now, were they defective when I bought them about a decade ago, or did they "rust" sitting in a drawer that long?

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