查看IO口方法

 今天在用STM8L151K6做输出使能ADP3110A于是把IO口做如下配置用的是PC1

GPIO_Init(ADP3110A_EN_PORT, (GPIO_Pin_TypeDef)ADP3110A_EN_PINS, GPIO_Mode_Out_PP_High_Fast);

 GPIO_SetBits(ADP3110A_EN_PORT,ADP3110A_EN_PINS);//开启ADP3110A_EN

但是用示波器测量发现只是1.4V左右,查看数据手册

发现在输出兰只有T7 查看注释

In the open-drain output column, ‘T’ defines a true open-drain I/O (P-buffer, weak pull-up and protection diode to VDD are
not implemented).
该引脚设置为OD门需要在外部接上啦电阻才可以使能高电平。

原文地址:https://www.cnblogs.com/xiangxiangyuan/p/4920844.html