I was struggling with a different charger IC, so I switched over to the BQ21040DBVR. Right now it is Deadbugged and mod wired in place of the original charger IC.
The target is to charge a Sparkfun PRT-13851 battery with a USB connector as the VIN and monitor the charge status with an ATTINY88.
I have logged the charge and it looks like it is charging the battery fine but when the charge current gets below 10% of the Fast Charge current, the CHG does not go from LOW to Hi-Z as it should. However, if I unplug the charger and plug it back in, CHG goes into Hi-Z state.
This is a similar problem that I was having with the previous IC so there is likely a common problem that I have no idea how to fix.
Here is a simplified version of the schematic that shows the value choices and the interface with the ATTINY88.
[url=https://postimg.cc/w39kCfxB][img]i.postimg.cc/.../url]
Since the CHG pin has a light pull-up to VIN, I feel like I need to divide the signal down to 3.3V levels so I don't fry the ATTINY88 pin with 5V. I simulated the resistor configuration on EasyEDA, and it should put the correct voltages for VINH and VINL.
Is this the correct way to interface with a processor?
Is there something else that I am missing?
Thanks!