+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 41 to 43 of 43
  1. #41
    Join Date
    Mar 2008
    Posts
    51

    Default Re: 18F2550 and Blink Led

    "The weak pull-up is automatically turned off when the port
    pin is configured as an output."
    So this means all of the wpu are turned off on portb if any pin is a output on portb? I guess I thought because the data sheet said "The weak pull-up is" not "The weak pull-ups are turned off it meant just that one pin.

    Thank you very much for clearing that up.

  2. #42
    Join Date
    May 2013
    Location
    australia
    Posts
    1,444

    Default Re: 18F2550 and Blink Led

    So this means all of the wpu are turned off on portb if any pin is a output on portb?
    no it means
    if (INTCON2<7>) is set then all portb pull ups are off
    if (INTCON2<7>) is clear then all portb pull ups are on and that no pin that is an output can have a pull up
    This is more entertaining than Free to Air TV

  3. #43

    Default Re: 18F2550 and Blink Led

    If there's any confusion on how to set the pin direction, I like to think of it this way... the TRIS register is short for TRI-STATE register.
    If a pin is tri-state, it's floating, so it must be an input. Setting the TRIS bit = 1 enables the tri-state, so 1=input, 0=output.

Members who have read this thread : 22

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