USB Power detect with MK64F

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

USB Power detect with MK64F

跳至解决方案
655 次查看
loicguillain
Contributor II

battery_function.PNG I'm using a function to charge a battery and supply the MK64F when it's usb supplied and use this battery to suuply the microcontroller when it's not usb supplied. I would like to know how i can do to indicates which entry it has to his power supply port (to authorize sleep mode or not).

I tought to use a voltage divider connected between +5v of my USB and a GPIO (in input) and generate interrupt. Could I get your advice?

Thanks to you.

标签 (2)
0 项奖励
1 解答
501 次查看
danielecortella
Contributor V

Hi,

Normaly the USB charger have a PGOOD pin that indicate when an external power is connected but in your case you don't have, so yes you can use a voltage divider using two resistors.

在原帖中查看解决方案

0 项奖励
2 回复数
502 次查看
danielecortella
Contributor V

Hi,

Normaly the USB charger have a PGOOD pin that indicate when an external power is connected but in your case you don't have, so yes you can use a voltage divider using two resistors.

0 项奖励
501 次查看
loicguillain
Contributor II

Thanks to you for your fast answer :smileywink: and your help.

0 项奖励