I'd like to interface the STAT line of an MCP73831 lithium ion charge manager IC to a microcontroller to read the current charging status of it.
The datasheet explains, in the section 5.2.1, that the STAT line is tristate output and have the following status:
- High
- Low
- High-Impedance
and a table is provided that explains how each level represents each charging states of the battery.
How can I connect this pin to a microcontroller I/O and read these three distinct states?
Reading High and Low is quite straightforward, but detecting a input is high impedance I've not done before.