how to connect kia7045 or kia7042 with mclr pin ?

Thread Starter

ahmedzaidan

Joined Jul 22, 2017
39
hi all,

i built a circuit to control a relay using pic16f877a..

i used a led instead of the relay to test the circuit on bread board.

the circuit was operated correctly at the beginning but today when i tried to test it again ,the circuit reset when the led become on .

i used decoupling capacitors..
i enabled power up timer..

one of our university engineer suggest to use kia7045 or kia7045 with reset pin ..

i have searched about the connection but i couldn't found anything on how to use it with MCLR pin ^^

regards
 

JohnInTX

Joined Jun 26, 2012
4,344
A lot of things can cause a reset as code executes.

First, you can eliminate MCLR/ as a suspect by connecting it directly to Vdd (no resistors or caps). If the problem goes away, you might be getting noise into MCLR/, it only takes 2us to reset this part. If noise into MCLR/ is the problem, consider a smaller R on any RC reset circuit. You could try to isolate the slow RC reset circuit from MCLR/ by a series resistor and .1uf ceramic cap to ground for high speed decoupling. Keep in mind that old PICs like this are relatively sensitive to MCLR/ noise. Later ones have a digital filter that fixes the problem.

If that is not it, what are you using for power supply? If you are using batteries and they are not fresh, the additional load from the LED might be enough to trigger the brown-out detector (which you can disable in the configuration bits) or drop Vdd below minimums.

Is the WatchDog timer enabled? If so and you are not resetting it often enough (dumb delay after turning on the LED?) it will reset the chip.

The KIA7045 is just a voltage detector, it does not provide a whole lot of delay on reset. It does pretty much the same function as the built-in brownout detector i.e. generate a reset pulse when Vdd drops below some threshold. But try it and see.

If this doesn't help, post your circuit and code and we can take a look at it.

Good luck!
 

Thread Starter

ahmedzaidan

Joined Jul 22, 2017
39
A lot of things can cause a reset as code executes.

First, you can eliminate MCLR/ as a suspect by connecting it directly to Vdd (no resistors or caps).

i tried it the problem still exist .
If the problem goes away, you might be getting noise into MCLR/, it only takes 2us to reset this part. If noise into MCLR/ is the problem, consider a smaller R on any RC reset circuit. You could try to isolate the slow RC reset circuit from MCLR/ by a series resistor and .1uf ceramic cap to ground for high speed decoupling. Keep in mind that old PICs like this are relatively sensitive to MCLR/ noise.

Later ones have a digital filter that fixes the problem.
pic18f4520 has adigital filter ?

If that is not it, what are you using for power supply?
i used linear 5v power supply
mobile charger
farnell power supply used in the lab .
.


If you are using batteries and they are not fresh, the additional load from the LED might be enough to trigger the brown-out detector (which you can disable in the configuration bits) or drop Vdd below minimums.

Is the WatchDog timer enabled? i disabled it

If so and you are not resetting it often enough (dumb delay after turning on the LED?) it will reset the chip.

The KIA7045 is just a voltage detector, it does not provide a whole lot of delay on reset. It does pretty much the same function as the built-in brownout detector i.e. generate a reset pulse when Vdd drops below some threshold. But try it and see.

If this doesn't help, post your circuit and code and we can take a look at it.

Good luck!
 

JohnInTX

Joined Jun 26, 2012
4,344
18F4520 has the same MCLR/ timing - BUT it is a far better chip to use than the '877

How about a sketch of the circuit and the code listing?
Did you try the KIA7045? Curious...
 

Thread Starter

ahmedzaidan

Joined Jul 22, 2017
39
18F4520 has the same MCLR/ timing - BUT it is a far better chip to use than the '877

How about a sketch of the circuit and the code listing?

Did you try the KIA7045? Curious...

No..
how can i connect it ?



i have tried to program the pic again ..
no problem till now ^^
 

JohnInTX

Joined Jun 26, 2012
4,344
Refer to the datasheet for hookups but if it still resets when you connect MCLR/ directly to Vdd, your problem is not noise into MCLR/ and adding the KIA7045 will not help you.

If you are sure that you have made no changes to the code, check your wiring - breadboards are easy to mess up. Make sure you are using a resistor in series with the LED. Have you connected both sets of Vdd and Gnd?
 

Thread Starter

ahmedzaidan

Joined Jul 22, 2017
39
Refer to the datasheet for hookups but if it still resets when you connect MCLR/ directly to Vdd, your problem is not noise into MCLR/ and adding the KIA7045 will not help you.

If you are sure that you have made no changes to the code, check your wiring - breadboards are easy to mess up.

I DON'T have made any change to the code and wiring :)

Make sure you are using a resistor in series with the LED.
I'm not using a series resistor with the led on bread board ..

Have you connected both sets of Vdd and Gnd?
No :)
thank you for your appreciated effort :)
 

JohnInTX

Joined Jun 26, 2012
4,344
You're welcome.
I am making some assumptions like:
Power is correct voltage and stable
The oscillator is correctly configured and ramming at the expected frequency.
Your code correctly initialized the IO ports for direction and digital pins

If you provide all of that, the PIC should run in a stable manner.

If you still need help, post the schematic and code.
 

philba

Joined Aug 17, 2017
960
Hmmm, I don't see any distis even carrying that chip. What exactly is is supposed to do?

I've built a couple of 16F877 boards that drove relays and have not had a problem with resetting. Post the schematic so we can see what you have.
 
Top