I need help/suggestions for the implementation of my schematic:
In the schematic image pasted below, particularly look only at the charging IC, boost converter, analog switch, and ATTiny 1616 controller part.
I have a push switch with an LED. I want this LED to display the charging status and the battery's critical level (it remains ON when charging and should blink when the battery is critically LOW.)
Here's the problem for which I used the analog switch: The CHG pin of the charging IC can control the LED when charging (remains ON when charging and OFF when charge is completed.) this will also happen even when the device is OFF using the En pin of the converter (therefore the controller is OFF.)
When the device is ON and the charger is disconnected, I want the control of the LED to shift to the digital pin of the ATTiny1616, which would blink when the battery is LOW. Even if at this point the charger is connected (the device is ON,) the control of the LED will shift again to the CHG pin of the charging IC. This switching is being done by the analog switch (https://www.lcsc.com/datasheet/lcsc_datasheet_2005271036_Diodes-Incorporated-74LVC1G3157FZ4-7_C526344.pdf).
I need help on whether this is a viable solution.