Pic does not work properly


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

    Smile Pic does not work properly

    Hello. My problem is that when I power up my pic it seems to stop right after the first instruction (which is to set a bit, in this case it is a led), but I just found out that if I put my finguer on the pin that connects to ground it works fine!! Does anybody know why is this happening? I canīt be puting my finger on it all the time!!
    Thank you.

  2. #2
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Default Best Guess

    Hi Armando, you seem to have put you FINGER on the problem.
    At first I thought "Of course, because this is a DIGITAL circuit".

    My own "HANDS ON experience" has shown this type of mysterious phenomenon to happen when the MCLR pull-up resistor is forgotten.

    Maybe, missing or wrong value capacitors on the crystal.

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  3. #3


    Did you find this post helpful? Yes | No

    Thumbs up

    Hi Adam. Look, I have a pull-up resistor to MCLR just like the specification sheet sugests, Iīm unsing a 10 Mhz Crystal and 33 pF capacitor. In fact I am changing the value of the crystal from 4 Mhz to 12 Mhz just that I also change te capacitors from 33 pF to 15pF because Iīm trying to get a baudrate of 115200, so thatīs the why Iīm experimenting with diferent crystals. And one more thing, I also found that when I connect the serial cable it always works, I figure thatīs because the external part of the serial cable is connected to gnd... what do you think?

    Thanks a lot!

  4. #4
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile oops

    Hi Armando,

    I see you have done everything exactly by the book.
    It sound like you are correct about the serial cable adding a ground. Same with your finger on the LED.

    What do you use for a power supply? Low noise? Is the ground connection between the supply and your PIC circuit good?

    Do you have two capacitors near the power pins of the PIC to ground.
    Something like a 10 microfarad. and a 0.1 microfarad, in parallel.

    I would double check all the intended ground connections to see if some might be forgotten.

    Maybe some of the unused / un-terminated pins are picking up noise.

    Any other suggestions for Armando out there?

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  5. #5


    Did you find this post helpful? Yes | No

    Talking Hello again.

    Hey Adam, thanks for your help. I appreciated too much. Listen, you wrote this:

    "I would double check all the intended ground connections to see if some might be forgotten.

    Maybe some of the unused / un-terminated pins are picking up noise."

    Are you suggesting that I should connect all the unused pins to ground?? And what is exactly all the intended ground connections? I mean, I only have de gnd pin connected to ground, well and the capacitor too. I also have the 10 microfarad capacitor in parallel with the 100 nanofarad capacitor...

    Thanks for your help!

    Armando.

  6. #6


    Did you find this post helpful? Yes | No

    Talking I got it!!

    Hey everybody. Hey adam I got it, or at least I think so. At first I though that the pic wasnīt working properly for some strange reason and that when I had the pic on the board it would work just fine, but it didnīt. But after a while I found that the problem was on pin 38, wich is the RB5/KBI1/PGM. When I put this pin to ground it work perfectly fine!! Even on the protoboard. I donīt know whatīs the reason of this, so if anyone could explain me Iīd be very thankfull. Thank you.

    Armando.

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    what is your PIC?
    Did you disable the low-Voltage Programming fuse?
    What about your schematic?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8


    Did you find this post helpful? Yes | No

    Question Low-voltage fuse????

    Hello Steve. My pic is 18F4550. I donīt know what is the low-voltage fuse, Iīll check it... and the schematic... well itīs just the pic with its power pins the reset circuit and the oscillator with its respective capacitors and I have a led on portb.7, portb.6 and portb.5. Iīm also using the USART pins to communicate a CMUcam to my pic.... and thatīs it!...... sorry I donīt post the schematics but right now I donīt have any but Iīll make one. Thanks!!

    Armando

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm, looking at the default fuse setting, the low-voltage programming is already disabled, and the value pass great to MPLAB, so just double check the configuration fuse setting before you program your PIC, and be sure that the low-voltage programming is set to OFF or Disabled.

    After that... i don't see any other software reason why it shouldn't work...maybe i need to sleep too.. who knows

    Just post your code and schematic and i'll test it here.
    Last edited by mister_e; - 29th June 2006 at 04:16.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. My PIC program won't work! Plz Help?!
    By beckyzammi in forum mel PIC BASIC
    Replies: 2
    Last Post: - 4th March 2010, 18:26
  2. Getting SERIN2 to work?
    By BobPigford in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 22nd July 2009, 20:10
  3. Replies: 16
    Last Post: - 3rd November 2008, 19:58
  4. Pic driven digital audio delay
    By skimask in forum Off Topic
    Replies: 12
    Last Post: - 19th April 2007, 20:42
  5. Work for keen PIC coder
    By ERIK in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th April 2007, 09:17

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