PortD on 18f4550 cofig pullup for switches


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Red face

    Thanks Melanie

    Like I said the change over switch idea is not ideal, but I cant think of anything else just off hand.
    If there is no way to do it by programing the pic then that only leave's phisical methods, hmm, gonna have to give this project some more thought before deciding if it is viable.
    Thanks very much for taking the time to reply :-).
    Reading the datasheet & understanding it are two different things.

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Bonxy, The change over switch as you call it is nothing more than a single pole/double throw. As far as shorting out the +5 volts to ground if it is a make before break, just tie the +5 volt side through a 4.7K resistor. The resistor will allow a small current to flow through it but not short the supply.

    Dave Purola,
    N8NTA

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    This is the whole issue here Dave, if only Bonxy would use a Resistor all his problems would go away - but he won't.

  4. #4
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Talking

    Hi Dave

    thanks for that :-), I have been trying that with a standard 3 pin changeover 'microswitch', BUT, while I have been experimenting with it I have 'somehow' managed to get a switch working either as active low or as active high without any resistors and with only 2 wires, despite what I have been told it seems to be working ?????, I am not holding my breath though because the person that told me this cannot be done is prety expert on this stuff.
    Im thinking that there may be something I've overlooked on my dev board (EasyPic3), Ive removed all the pull-up/pull-down jumpers to be sure and it seems to be working ?.
    This is strange, lol :-), its doing exactly what i want it to, that worries me.
    Reading the datasheet & understanding it are two different things.

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Bonxy, There may be parasitic resistance from solder flux or something on the board you are using for prototyping the circuit on. I personally would NEVER use a digital input from a processor without some kind of active state. The best you could do is what I suggested in my last email if you dont have any room on the prototype board you are using.. The resistor can be located at the switch or the point you pick up the +5 volts.. The problem with letting the unknown resistance control the state of the input is you cant say for sure the state will be stable when you put the circuit into the REAL WORLD... It is nothing more than an antenna in this state and anything can influence its state... Highly unstable...

    Dave Purola,
    N8NTA

Similar Threads

  1. 18F4550 to 18F2550
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th September 2007, 23:13
  2. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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