Maker Pro
Maker Pro

Blinking led with a PIC

L

lerameur

Jan 1, 1970
0
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 :
http://www.voti.nl/blink/index_1.html#16F88
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
 
L

lerameur

Jan 1, 1970
0
Jamie said:
i would say that your over heating it, or battery supply is dropping on
you. or you have a bad PIC chip.

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
http://www.voti.nl/blink/index_1.html#16F88

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
 
J

Jamie

Jan 1, 1970
0
lerameur said:
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 :
http://www.voti.nl/blink/index_1.html#16F88
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
i would say that your over heating it, or battery supply is dropping on
you. or you have a bad PIC chip.
 
B

Bob Eld

Jan 1, 1970
0
lerameur said:
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 :
http://www.voti.nl/blink/index_1.html#16F88
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

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
 
L

lerameur

Jan 1, 1970
0
Bob said:
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

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

ken
 
E

Eeyore

Jan 1, 1970
0
lerameur said:
I found the problem, had to put a resistor to the MCLR port.. pffff
unbelievable

This must be one reason I never use PICs.

Graham
 
Top