Connect with us

Blinking led with a PIC

Discussion in 'Electronic Basics' started by lerameur, Sep 22, 2006.

Scroll to continue with content
  1. lerameur

    lerameur Guest


    I am trying to make a led blink.
    I am using picbasic compiler. I get the program to work and the circuit
    to work, But it only blinks for a short amount of time, about 20 to 30
    seconds. Even if I disconnect the power and replug it do not start
    The circuit is supplied with 5v
    If I disconnect the power for at least 10 min and then reconnect, then
    it will start again for about 20 sec.

    Also, I download a program done in hex from :
    and it works fine

    here is the code i use: which if found on google on many web sites
    using pic chip 16F88

    loop: High 0 ' Turn on LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Low 0 ' Turn off LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever

  2. lerameur

    lerameur Guest

    i am using a 12v battery (12.89v)
    with a LM7805 supplying to the circuit. so I am getting 5v.
    I have a chip that i loaded with a hex file I got on google, compile in

    but i used MicroC and picbasic pro to get my hex file, it blinks only a
    few times and then stops.

    The chips are new, I tryed a few chips and they all do the same thing.
    excpet the one written in Jal which can blink forever

  3. Jamie

    Jamie Guest

    i would say that your over heating it, or battery supply is dropping on
    you. or you have a bad PIC chip.
  4. Bob Eld

    Bob Eld Guest

    Be sure to have a resistor in series with the LED to limit the current to
    25mA. 120 or 150 ohms should work. You're probably overheating the device
    and it is shutting down after awhile then re-starts ok when cool.
  5. lerameur

    lerameur Guest

    I found the problem, had to put a resistor to the MCLR port.. pffff

  6. Eeyore

    Eeyore Guest

    This must be one reason I never use PICs.

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day