pic18f2550 pin RB5 issue

Author
korenje
Starting Member
  • Total Posts : 58
  • Reward points : 0
  • Joined: 2007/04/27 18:15:23
  • Location: Slovenia
  • Status: offline
2007/04/27 18:33:03 (permalink)
0

pic18f2550 pin RB5 issue

Hello.
I am having trouble with making signal (high voltage) on pin RB5. I disabled LVP, grounded this pin through 10kohm resistor, and it's still not working. I get 0.0-0.2V from this pin no matter what.
If I remove resistor and touch RB5 pin with some metal or anything, it will shut down the PIC or reset it.
 
Also, is it normal to get only 2.27V on pin RA6/OSC2 even when OSC2 is disabled? What am I doing wrong?
thanks.
 
#1

8 Replies Related Threads

    korenje
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2007/04/27 18:15:23
    • Location: Slovenia
    • Status: offline
    RE: pic18f2550 pin RB5 issue 2007/04/27 20:28:41 (permalink)
    0
    hmm strangely I changed some setting for my JDM programmer and now RB5 works. Maybe my programmer didn't disable LVP... who knows [:-]
    #2
    DarioG
    leaving this planet
    • Total Posts : 53071
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    RE: pic18f2550 pin RB5 issue 2007/04/27 22:03:59 (permalink)
    0
    It's usually better to place #pragma config or CONFIG directive in the source code, rather than relying on the Programmer to get them working correctly. It's... safer Smile

    Dario Greggio
    --
    how does it feel, never having been loved? as life fades away, day after day, on this planet made of s h i t...

    #3
    korenje
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2007/04/27 18:15:23
    • Location: Slovenia
    • Status: offline
    RE: pic18f2550 pin RB5 issue 2007/04/27 22:23:36 (permalink)
    0
    #pragma config ?
    what does this do? will it work on any programmer?
     
    I've found out, that LVP bit is being set to 1, when I read device, even though I am clearing it in JDM programming software sad
    maybe that one time working was just a fluke [:'(]
     
    #4
    DarioG
    leaving this planet
    • Total Posts : 53071
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    RE: pic18f2550 pin RB5 issue 2007/04/28 03:17:43 (permalink)
    0
    Yeah, it should really work on any sane programmer wink

    If you're using C (C18) then the syntax is #pragma config [...] followed by a series of parameters that you can find in the Docs and in the ? menu of MPLAB.
    If you're using Assembler, the syntax is CONFIG [number] and you should be able to find the values (to be combined together for ease of read) in each device's datasheet.

    Dario Greggio
    --
    how does it feel, never having been loved? as life fades away, day after day, on this planet made of s h i t...

    #5
    korenje
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2007/04/27 18:15:23
    • Location: Slovenia
    • Status: offline
    RE: pic18f2550 pin RB5 issue 2007/05/02 05:00:04 (permalink)
    0
    ok now I got a different problem. I got another device connected to RB5 pin, which gives 5V signal. When I read with voltmeter, I got only 0.8V and the PIC won't detect a signal. RB5 pin is grounded through 10kohm resistor, because otherwise it would reset the pic or something. How can I read a signal on that pin now?
    #6
    jeff_m_lee
    Super Member
    • Total Posts : 469
    • Reward points : 0
    • Joined: 2005/06/08 09:04:36
    • Status: offline
    RE: pic18f2550 pin RB5 issue 2007/05/02 05:07:51 (permalink)
    0
    The signal you want to drive RB5 with needs to have output impeadance much lower than 10k - say 1k or lower, then provided you have RB5 configured as an input everthing should work fine. 
    #7
    DarioG
    leaving this planet
    • Total Posts : 53071
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    RE: pic18f2550 pin RB5 issue 2007/05/02 05:07:51 (permalink)
    0
    Again, that thing on RB5 seems to be caused by LVP active.

    Dario Greggio
    --
    how does it feel, never having been loved? as life fades away, day after day, on this planet made of s h i t...

    #8
    korenje
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2007/04/27 18:15:23
    • Location: Slovenia
    • Status: offline
    RE: pic18f2550 pin RB5 issue 2007/05/02 13:38:54 (permalink)
    0
    I think the pic is broken. I checked and lvp was disabled.
    #9
    Jump to:
    © 2017 APG vNext Commercial Version 4.5