完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我使用pe1和pe2引脚用于i2c但这个引脚现在不能正常工作。我制造高pe1和pe2,但这个引脚总是低,但pe0和pe3可能很高。我如何为i2c连接此引脚?
以上来自于谷歌翻译 以下为原文 I used pe1 and pe2 pin for i2c but this pins not work normally now. i make high pe1 and pe2 but this pins always low but pe0 and pe3 can be high. how do i connect this pins for i2c? |
|
相关推荐
2个回答
|
|
|
你好,
如果我没记错的话,I2C引脚(也可能是端口PE中的其他引脚)没有上拉功能。 https://my.st.com/public/STe2ecommunities/mcu/Lists/STM8SDiscovery/AllItems.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM8SDiscovery%2FGPIO%20Pull%2Dup%20resistors%20on%20Port%20E 以上来自于谷歌翻译 以下为原文 Hello, If I remember correctly, the I2C pins (and maybe others from port PE) don't have the pull-up functions. https://my.st.com/public/STe2ecommunities/mcu/Lists/STM8SDiscovery/AllItems.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM8SDiscovery%2FGPIO%20Pull%2Dup%20resistors%20on%20Port%20E |
|
|
|
|
|
你好宝来,
正如Klaas所说,I2C引脚没有WPU(弱上拉)功能(您可以在数据表的修订历史(修订版8)中找到相关信息)。因此,您必须提供自己的上拉电路(通过连接两个4.7K电阻)。您可以在数据表的第95页找到示例电路。 作为附加信息,您应首先启用I2C时钟,然后执行其他操作(如设置I2C特定参数)。否则您的参数将无法正确设置,您无法看到I2C外设正常工作。 以上来自于谷歌翻译 以下为原文 Hello Bora, As Klaas said, I2C pins do not have WPU (Weak Pull-Up) feature (You can find the info at the Revision history of the datasheet (Revision 8)). Therefore you have to provide your own pull up circuit (via connecting two 4.7K resistors). You can find an example circuit at page 95 of the datasheet. As an additional info, you should enable the clock of I2C first and then do the other things (like setting the I2C specific parameters). Or else your parameters won't be set correctly and you couldn't see the I2C peripheral working. |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1472 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1524 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3674 浏览 1 评论
3864 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2483 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
751浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
684浏览 5评论
730浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
975浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
779浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-14 10:12 , Processed in 0.626351 second(s), Total 75, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2596