Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Avoid PIC Reset when battery charging

Not open for further replies.


Newbie level 2
Jun 23, 2015
Reaction score
Trophy points
Activity points
Hi, i am using a PIC18F26J50 on a project, my power source in this case is a lithium batery 4.1V with charger (LTC1733) feeding a 3.3V regulator (LM1117-3.3). The problem i have is a well known issue, but i still couldn't find any solution to it. When the battery is depleated and begins charging, it charges at a very slow rate, and so increasing the voltage at a very slow rate. When this happens, there is a problem with the PIC, wich starts when the voltage reaches the Vin threshold of the PIC, and basically it never actually power up the PIC correctly and it freezes, and no matter if the battery gets completly charged and voltage stabilizes, the PIC is still "frozen" or "tilt". To avoid this i've tryed using the brown out reset functions, wich failed. Now i added to the circuit a specific IC for this kind of problems, an IC Reset DS1233A, and still the problem persists, i've even tryed to add a voltage divider to the Vref of the DS1233A so it would trigger at a higher voltage. The nature of this problem i believe it's because of the very slow voltage increase when the battery is charging.

The tricky part is that when its "frozen", it's not enough with reseting the PIC through the MCLR pin...... i actually have to take take out the battery to power down completely the PIC, and then re-intert it, and only then the PIC will start working again......

I'd like to know if any one has come up with a solution for a problem like this. Thank you-
Last edited:

Try using PIC18LF26J50 which is 3.3V version of the PIC18F26J50. See if that solves the problem. How much the battery discharges ? That is what will be the voltage of the battery when it is discharged ?

To avoid this i've tryed using the brown out reset functions, wich failed

Probably there should be some other problem on circuit not yet considered, due this should work.

I am using a 3.3V version, that's why i am using the 3.3V regulator. As for the battery discharged voltage, after many test i found out that whenever the regulator output voltage drops below 2.7 - 2.8V (wich is about the threshold voltage of the PIC), the problem starts, doesn't matter if the voltage keeps going lower or if i start charging it at that point. Noted that for the reg. output to go 2.7V the battery has to be 3.5V aprox.

The thing is i have worked with this exact PIC in many projects, and is not that the brown out reset functions won't work in this PIC, it's just they don't work for this specific problem, aparently the voltage lingers for so long in a grey area for the PIC (between the thershold RESET/ON) that the PIC just gets stuck. As i said in the other reply, it gets "frozen" to a level that i have to actually take the power supply off and put it back on, it's not enough to just use MCLR.

It is better to force reset to MCU when voltage is out of spec. Use a comparator for V_OK to use a one of the signals to cause reset. Others may be a sanity timer.

Use low voltage MOSFET switches to minimize V drop and ensure you use very low ESR cap on Chip as MOSFET Coss is also low ESR so even if C ratio is high ( load cap>> Coss) the spike level is more determined by ESR ratio to prevent spikes when switching stored in capacitance such as a battery.

Not open for further replies.

Part and Inventory Search

Welcome to