Detect USB Charge via MCP73831

Hello All,
I have a little lipo charger that uses the MCP73831/2 chip. It's actually the SOT-23-5 version and here is the datasheet http://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf

Here is the actual product that I own

Please help me understand how I can use the A6 pin on a pro trinket to detect whether or not a usb cable is attached and charging the battery.

I was using a 1ohm-1ohm voltage divider from the 5V pin on the trinket but that seems to be getting in the way of a voltage divider that I'm using for another reading, so I had gotten rid of that and had gone with a jumper from the PROG (5) pin on the MCP73831 to the trinket A6 and had some success but now reading the data sheet again and again, I just can't figure how that worked in first place.

I see that I can use a pullup resistor from the STAT (1) pin on the MCP73831 to an input on a micro but really I don't understand how that works.

again, please help me understand how I can detect when the usb is connected.

Thank You, John

I looked at that little charger: I can't decipher exactly what voltages are where from the picture, but if you were to put a photoresistor right over the charge LED, you could use the varying resistance value (as a varying voltage) an an analog pin. The charge light is probably on when the USB cable is connected, but it also might go out when full charge is reached.

Got it. Since I had also posted my question on another forum I posted my solution over there. Check it out if you like: http://forum.allaboutcircuits.com/threads/lipo-charger-and-usb-detect.116538/

Thanks for chiming in. John