
RT,想用来做按键,设置输入上拉,但量出来是0.6V,一直为低,硬件不影响。查手册也说有弱上拉,非IIC口。 配置如下 #define Key0_PORT GPIOD #define Key1_PORT GPIOB #define Key2_PORT GPIOB #define Key3_PORT GPIOB #define Key4_PORT GPIOB #define Key5_PORT GPIOB #define Key0_PINS GPIO_Pin_6 #define Key1_PINS GPIO_Pin_1 #define Key2_PINS GPIO_Pin_2 #define Key3_PINS GPIO_Pin_3 #define Key4_PINS GPIO_Pin_4 #define Key5_PINS GPIO_Pin_5 // 函数声明--------------------------------------------------------------------------- unsigned char KeyScan (void); unsigned char GetKeyValue (void); //------------------------------------------------------------------------------------- void KeyIoInit() { GPIO_Init(Key0_PORT, Key0_PINS, GPIO_Mode_In_PU_No_IT);//带上拉,输入 GPIO_Init(Key1_PORT, Key1_PINS, GPIO_Mode_In_PU_No_IT);//带上拉,输入 GPIO_Init(Key2_PORT, Key2_PINS, GPIO_Mode_In_PU_No_IT);//带上拉,输入 GPIO_Init(Key3_PORT, Key3_PINS, GPIO_Mode_In_PU_No_IT);//带上拉,输入 GPIO_Init(Key4_PORT, Key4_PINS, GPIO_Mode_In_PU_No_IT);//带上拉,输入 GPIO_Init(Key5_PORT, Key5_PINS, GPIO_Mode_In_PU_No_IT);//带上拉,输入 } PB1-PB5量是正常的VDD电压,PD6就只有0.6V,为什么呢 |
STM8S003无法检测到引脚电平
STM8 @svlreg 问题
STM8AF62XX+L99PM62GXP LIN通讯的电路原理图有吗?官网提供了一套软件,没找到对应的原理图,请大家指教一下
求一个STM8S207例程
初次接触STM8,请问在STVD中,为什么这个Struct会报错
STMS005K6T6 如何采集内部参考电压。
stm8s003 adc中断和通道切换的问题
adc施密特触发器stm8
stm8l051f3 TSSOP20 封装,待机模式下,2天后,电流突然增加到140UA
STM8S用STVP烧录怎么加密?
PD6上电复位默认是IO功能,如果你程序没有做其它与PD6管脚上功能相关的操作的话,应该是可以上拉的。
还有就是,电路有没有问题呢,比如说有没有下拉电阻。MCU本身的上拉能力比较弱,如果外部下拉电阻较小的话,一分压,电压就降下来了。
评分
查看全部评分