你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

STM32F1 联级74HC165 Q7反馈电平一直是低什么原因呢?

[复制链接]
shengxiaozhu 提问时间:2020-8-27 15:55 /
电路图部分:


1.png 2.png

软件部分:
3.png QQ图片20200827151920.png


#define HC165_PL         PCout(13)         //pl      
#define HC165_CLK      PCout(14)          //cp

#define HC165_DAT      HAL_GPIO_ReadPin(GPIOC,GPIO_PIN_15)     //Q7

探物传感器的状态是:电平为高(没有物品)  低电平(有物品)
各位大佬帮看看什么原因
收藏 评论3 发布时间:2020-8-27 15:55

举报

3个回答
tanic 回答时间:2020-8-27 17:30:10
1.   HC165_DAT!=0
2.   你确定你那个for循环中CLK的波形没问题? CLK拉高之后稍微延时一下
jason0821 回答时间:2020-8-30 13:57:15

会不会是 AFIO 设定接脚, 没切换到 GPIO?

PC14, PC15 -> 在部分 STM32F1 的封装中, 对应到LSE Crystal 32.768KHz
会不会是AFIO 没切换到GPIO?
jason0821 回答时间:2020-8-30 14:11:03

会不会是 AFIO 设定接脚, 没切换到 GPIO?

PC14, PC15 -> 在部分 STM32F1 的封装中, 对应到LSE Crystal 32.768KHz
会不会是AFIO 设定接脚, 没切换到GPIO?
UsingOSC32_IN/OSC32_OUT pins as GPIO ports PC14/PC15
The LSEoscillator pins OSC32_IN and OSC32_OUT can be used as general-purpose I/O
PC14 and PC15,respectively, when the LSE oscillator is off. The LSE has priority over the
GP IOs function.
Note: ThePC14/PC15 GPIO functionality is lost when the 1.8 V domain is powered off (by
enteringstandby mode) or when the backup domain is supplied by VBAT (VDD no more
supplied).In this case the IOs are set in analog mode.
Refer to the note on IO usage restrictions in Section5.1.2: Battery backup domain.
关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新和工艺
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版