Update: I resoldered a new IC and everything works.
I have designed a charging circuit for a device that I am building. The circuit uses a MCP73831-2ACI/MC (datasheet). These are the schematics:
The problem I am having is that the battery is not being charged. Very little current (0.5mA) is being drawn from the USB (VIN). When the USB is connected, the RLED will turn on, but very dim. However, the LED will stay turned on even if the battery is disconnected or connected. To me, this looks like the charger IC is not detecting the battery and therefore entering shutdown mode. This circuit is essentially a replica of what the manufacture provided in the datasheet.
There is a common ground plane on the board, however, VBAT and VIN are routed directly to their respective pins.
Why will the battery not charge? Does this have something to do with the rest of the device drawing current while charging?? Any help is much appreciated (and sorry if I missed any important info).
I have measured the following things on my circuit: VIN = 5.18v VBAT = 3.887v VIN current = 0.5 mA