[SOLVED]Help with PIC18F2550 soldered (sometimes it work, sometime it doesn't)

Discussion in 'Homework Help' started by KansaiRobot, Jun 11, 2015.

  1. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    318
    5
    Hello
    I would really appreciate if you can tell me any idea you get by the following situation. (I really need help :( )

    I have soldered a socket to a board, and put a 18F2550 in it. I have also soldered a circuit in it in which I use pin RB0~RB4. I also soldered RB6,7 to connect to the programmer. I have soldered other necessary components.

    The program I wrote basically gives 1s or 0s to pins B0 to B4. nothing else.

    I have successfully program the PIC.

    Then when I power the PIC sometimes it works, sometimes it doesn't. If it works it keeps working good until turn off (there is no unstability)

    When it doesnt, a small push in the side of the PIC makes it work. Investigating more, when it does not work a touch with a metal to the PIN B5 makes it work. if it is working it makes it not work again!!!

    Now I suspect about the soldering. however here is the strange and bewildering fact:

    I used a oscilloscope to test the PINs directly.(Not the soldered connections) Pin Vdd is receiving 5V successfully. However Pins B0 to B4 are not outputing anything!
    If I touch B5 they start.
    So It is not the soldering or the connections!!!

    What is happening here? Any idea?
    I have run out of possible solutions! :(
     
    Last edited: Jun 11, 2015
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,570
    2,381
    Is the /MCLR pin connected or floating?
    Max.
     
  3. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,693
    2,762
    Hopefully not...
     
    KansaiRobot and djsfantasi like this.
  4. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    318
    5
    it is pull up.

    I ve read that the problem might be pin B5 connected to nothing and me not disabling LVP in the code.
    I ll try this today.

    EDIT: I tried this on a breadboard and the same thing happens. So it is not a matter of soldering...

    When I connect a LED resistor circuit to B5, it does not work of course (as I post in my other thread) but the problem of this thread does not happen.
    So it is a B5 pin problem...sigh


    EDIT2 :It was never a matter of soldering. it turns put that B5 sometimes causes this behavior (reset). So you have to explicitly disable LVP in your code.

    In my case

    Code (Text):
    1. #pragma config LVP = OFF
    and voila! problem solved
     
    Last edited: Jun 11, 2015
Loading...