Pullup confusion 12c508a


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default Pullup confusion 12c508a

    saw this but WPUB must be wrong -- creates an error

    option_reg.7=0 ' Enable WPUs by individual pin
    WPUB = %11110000 'enable weak pullups on RB7, RB6, RB5 & RB4

    anyway -- trying to make this easy -- never used the pullups before.

    INTCON2.7 ?

    I'm seeing all sorts of conflicting internet crap about it and pullups are not not even mentioned in my PBP manual.

    Just trying to enable a pullup on GPIO 1 on a 12c508 and all other ports are output. HELP ! -- THANKS

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Pullup confusion 12c508a

    That chip is so old I am afraid to answer.

    Looking at page 17 of the data sheet.

    It looks like you would set the option register bit 6 to 0

    OPTION.6 = 0 'sets weak pullups on gp0,gp1 and gp3


    Add: Read this also
    http://melabs.com/support/12-bit.htm
    Last edited by mark_s; - 10th September 2016 at 00:00.

  3. #3
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    166


    Did you find this post helpful? Yes | No

    Default Re: Pullup confusion 12c508a

    Hi Michael,

    The PIC12C508A doesn't have a PORTB so your WPUB statement will obviously create an error.
    As mark_s has already stated, setting option register bit 6 to 0 will enable weak pull ups on GP0, GP1 and GP3
    These pins must be set as inputs.

    Note, hard pull-ups can always be implemented instead of weak pull-ups.

    I trust this helps.

    Cheers
    Barry
    VK2XBP

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Pullup confusion 12c508a

    Well actually I'm going to use a 12F675 as I now find out I can get it programmed. So, on a 12F675 -- how would I enable a pullup on pin 6 GPIO.1 ?

    THANKS much.

    By the way, "weak" pullup must mean what? Current capabiltiy of the resistor or something?

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Pullup confusion 12c508a

    Try this for setting the pull-up on GPIO.1

    Code:
    OPTION_REG.7 = 0 ' Set global GPPU
    WPU.1 = 1             'pull-up on gpio1 enabled
    Last edited by mark_s; - 10th September 2016 at 19:55.

Similar Threads

  1. help for 12C508A
    By dagger in forum General
    Replies: 3
    Last Post: - 31st August 2010, 00:25
  2. neebee wants to know pullup or pulldown?
    By lecoind in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 24th May 2009, 04:36
  3. picbasic +12c508a+soft_stack error
    By omid_juve in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 4th January 2008, 21:11
  4. 12c508A -- Using more Legs...
    By guest_05 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th August 2007, 13:12
  5. 12c508a Device Config. And Burning Issues
    By sayzer in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th March 2006, 17:50

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