• AVR Freaks

Hot!internal weak pull resistor getting 1.8V though VCC has 5V.

Author
yo123
Starting Member
  • Total Posts : 63
  • Reward points : 0
  • Joined: 2017/04/19 09:52:08
  • Location: 0
  • Status: offline
2020/06/27 04:18:21 (permalink)
0

internal weak pull resistor getting 1.8V though VCC has 5V.

hi ,
i am working on PIC18F16k22 . and i want enable internal pull on RC0 and RC1 pin.
enable it  by using 
TRISAbits.RA2 = 1; //MENU
 TRISBbits.RB4 = 1; //DECR

WPUAbits.WPUA2 = 1; //RA2 pull-up enable
 WPUBbits.WPUB4 = 1; //RB4 pull-up enable

but i am getting 1.8 V on this pin . how this possible i could not get it.
checked board for short circuit but  there is no use of it.
please tell what could be the possible mistake .
thanking you.
#1

6 Replies Related Threads

    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: internal weak pull resistor getting 1.8V though VCC has 5V. 2020/06/27 04:23:19 (permalink)
    0
    Please show the entire test program.
    One obvious possible explanation is that the WDT has been left enabled, and you are seeing an average voltage as your chip gets reset rapidly.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    PStechPaul
    Super Member
    • Total Posts : 2814
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: internal weak pull resistor getting 1.8V though VCC has 5V. 2020/06/27 14:17:50 (permalink)
    +1 (1)
    i want enable internal pull on RC0 and RC1 pin.

    However
    TRISAbits.RA2 = 1; //MENU
     TRISBbits.RB4 = 1; //DECR

    WPUAbits.WPUA2 = 1; //RA2 pull-up enable
     WPUBbits.WPUB4 = 1; //RB4 pull-up enable


     
    #3
    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: internal weak pull resistor getting 1.8V though VCC has 5V. 2020/06/27 14:47:42 (permalink)
    +1 (1)
    Good pick up Paul.
    I wonder what the real question is.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #4
    Jams100001
    Junior Member
    • Total Posts : 91
    • Reward points : 0
    • Joined: 2018/04/12 13:37:33
    • Location: MCHP Chandler
    • Status: offline
    Re: internal weak pull resistor getting 1.8V though VCC has 5V. 2020/07/02 13:18:19 (permalink)
    +1 (1)
    Yogesh,
    I'm using an educated guess you are working with the PIC18F26K22. You say you want to enable WPU on RC0 and RC1. Your code shows you are trying to enable WPU on RA2 and RB4. Which is what PStechPaul said above. First the PIC18F26K22 Only has WPU on PORTB. so when the compiler tries to compile you should receive an error on 
    WPUAbits.WPUA2 = 1;

     
    Jamus
    #5
    yo123
    Starting Member
    • Total Posts : 63
    • Reward points : 0
    • Joined: 2017/04/19 09:52:08
    • Location: 0
    • Status: offline
    Re: internal weak pull resistor getting 1.8V though VCC has 5V. 2020/07/04 03:27:19 (permalink)
    +1 (1)
     
    PStechPaul
    i want enable internal pull on RC0 and RC1 pin.

    However
    TRISAbits.RA2 = 1; //MENU
     TRISBbits.RB4 = 1; //DECR

    WPUAbits.WPUA2 = 1; //RA2 pull-up enable
     WPUBbits.WPUB4 = 1; //RB4 pull-up enable



    ohh no, this was my text mistake, actual problem was

     INTCON2bits.RABPU = 0;

     i thought by default this set to  zero,
    and thats the problem. thanking you
     
    #6
    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: internal weak pull resistor getting 1.8V though VCC has 5V. 2020/07/04 07:17:25 (permalink)
    +2 (2)
    ... and that is why we much you prefer you to post ALL the code you are testing with.
    More often then not, when you post snippets, the problem is somewhere else.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #7
    Jump to:
    © 2020 APG vNext Commercial Version 4.5