The Li-ion charger I'm using (MCP73831/2) has a tri-state status output. The datasheet says that the STAT pin outputs High-Z when inactive or complete, and Low while charging is active.

Whats the best way to hook this up to a nRF51822 GPIO?

Can I directly wire the stat output to a GPIO input, and then use an internal pull-up on the GPIO pin?

The nRF51822 is not 5V tolerant, but I don't think it will be damaged with a high-impedance output. Is this correct?

Relevant datasheets:


STAT output description (page 15, Table 5-1), reproduced here:

Table 5-1


1 Answer 1


Looks like an open drain output pin. So you need a pull-up of some sort. If you want to utilize an internal pull-up, that will probably get the job done just fine and save you some board area, just make sure it's initialized correctly before using the value read from the pin. It's perfectly fine to pull it up to any voltage within the allowed range for both chips. Lower voltages will generally work fine, higher voltages may or may not be OK depending on how the output pin is designed. You should be fine with a pull-up to 3.3 volts.

  • \$\begingroup\$ Thanks, that makes sense. I'll directly connect STAT to a a nRf51822 GPIO pin, and use a internal pull-up, will reply here if it all goes well! \$\endgroup\$
    – Rob Parker
    Apr 17, 2015 at 10:33
  • \$\begingroup\$ Hi @RobParker did this worked for you ? i have a similar issue. thanks for posting the question. \$\endgroup\$
    – Zskdan
    Nov 19, 2015 at 12:46
  • \$\begingroup\$ @RobParker Ditto, I have the same problem with a different charger IC that also uses an open drain flag, high impedence. Logic high on my main processor GPIO input is 3.0V, and I've configured a pull up on the input pin in firmware, but I'm not seeing the input go high. Did you get this to work? \$\endgroup\$
    – Eliot
    Oct 9, 2017 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.