PIC16F886 Pulldown inputs


Closed Thread
Results 1 to 8 of 8

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: PIC16F886 Pulldown inputs

    I didnt do that - as you can see PARK for example - pin 15 - is the output of pin 16 when pin 1 is high. 15 is basically floating when not activated - I want the pin on the PIC to be active high - not low. I think adding a high ohm resistor to ground will take care of it. Unless you have another idea?

    I could have used a simple voltage divider as the input - but the input voltages could exceed the divider output (<5V) and I thought the opto would do the trick passing 5V(VCC) which is regulated.

    Any way to paste a screen shot instead of a pdf?

    https://optoelectronics.liteon.com/u...is%20Mar17.PDF - opto pinout
    Attached Images Attached Images
    Last edited by pescador; - 9th January 2024 at 22:54.
    My dad never liked you...

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,127


    Did you find this post helpful? Yes | No

    Default Re: PIC16F886 Pulldown inputs

    I am sorry but this is not correct as you designed it.

    Now the only way is to add the resistors to ground from all the relative PIC inputs. And do add 10K resistors. Not more than that because of noise that can distrurb the input. Better change the 2K to 100 ohms too.

    The usual practice is to have Pull Ups and then the opto drive to ground the input. If you want the input high then just reverse the byte your read from the port in software. Easy task.

    Also note that in 886, there are Pull-Ups only on Port B and not on Port A.

    Ioannis
    Last edited by Ioannis; - 10th January 2024 at 10:19.

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


    Did you find this post helpful? Yes | No

    Default Re: PIC16F886 Pulldown inputs

    Ok thanks - I'll connect the opto collector tied high to the PIC and drive the Opto to GND - easy - no need then for ground resistors...

    Thanks for R values..REV.pdf
    My dad never liked you...

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,127


    Did you find this post helpful? Yes | No

    Default Re: PIC16F886 Pulldown inputs

    Maybe I was not very clear.

    With your original design, you would change the 2K to 100 ohms.

    But with the new design, the pullup will be around 10K. NOT 100 ohms. I am pretty sure you will destroy the optos.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: PIC16F886 Pulldown inputs

    - So just to be clear - I'm driving the optos using the 2k to the anode, the output is the "collector" tied hi to a resistor - to the PIC w 5V. I'm not sure 100 ohms to the PIC would damage the PIC, but I dont think the opto would care?

    In any case - I'll use 10K like you suggest.. no real reason to use 100.
    My dad never liked you...

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,127


    Did you find this post helpful? Yes | No

    Default Re: PIC16F886 Pulldown inputs

    With 100 ohms from +5 to the collector of opto, you will force 50mA through opto. This is the absolute max according to the data sheet. It will lead sooner or later to the destruction of the opto.

    Please do use 10K from +5 to the collector of the opto and drive from the collector the PIC port. The emitter of the opto will be earthed.

    Everytime you feed current to the LED of the opto, the PIC port will be low and when the LED is off, port will be high.

    Ioannis

Similar Threads

  1. PIC16F886 not running.
    By Lilleljung in forum PBP3
    Replies: 19
    Last Post: - 6th January 2015, 21:35
  2. pic16f886
    By NURULHAIZA in forum General
    Replies: 5
    Last Post: - 21st May 2010, 08:09
  3. neebee wants to know pullup or pulldown?
    By lecoind in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 24th May 2009, 03:36
  4. pullup and pulldown resistor help
    By studysession in forum General
    Replies: 5
    Last Post: - 29th January 2009, 02:46
  5. Pic16f886
    By Larry in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th October 2008, 22:40

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