Post History
I want to design a simple battery charger using MCP73831/2. This chip has a 3-State state pin according to the table below: I have a 3.3V MCU and I want to connect this pin to a GPIO. The MCU is...
#1: Initial revision
Level shifting of a 3 state logic pin
I want to design a simple battery charger using [MCP73831/2][1]. This chip has a 3-State state pin according to the table below: [![enter image description here][2]][2] I have a 3.3V MCU and I want to connect this pin to a GPIO. The MCU is not 5V tolerant and maximum votlage on any pin is given 3.6V per datasheet (esp32). My question is, how can I safely connect this STAT pin to my MCU? How can I translate its HIGH state (which is I guess 5V) to 3.3 and its LOW state to 0V (logic low). Is a resistor divider enough for this? or will I need to use mosfet or transistors? Here is my circuit: [![enter image description here][3]][3] [![enter image description here][4]][4] [1]: http://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf [2]: https://i.stack.imgur.com/GiEHb.png [3]: https://i.stack.imgur.com/cGPAz.png [4]: https://i.stack.imgur.com/GdNjr.png