Blinking led with a PIC

HI

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 again. 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 :

formatting link
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 End

ken

Reply to
lerameur
Loading thread data ...

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 jal

formatting link

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

ken

Reply to
lerameur

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

--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

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. Bob
Reply to
Bob Eld

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

ken

Reply to
lerameur

This must be one reason I never use PICs.

Graham

Reply to
Eeyore

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.