完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
我正在尝试用I2C主控器来复用GPIO PIN功能,而我似乎不能把它作为输出来工作。
我可以让PIN输入并读取它;如果我从引脚上断开I2C模块的原理图,PIN工作得很好,所以我知道我的硬件是好的。 以下是我的代码: int() { UIT88T温度=A4YBYP; 温度=温度和0xFe; A4YBYP =温度; A4X设置驱动器(A4A); A4-写(0); (;) { A4-写(1); CyDelay(500); A4-写(0); CyDelay(500); } } 有什么想法吗? 迈克 以上来自于百度翻译 以下为原文 I'm trying to multiplex GPIO pin functionality with an I2C master, and I can't seem to get it to work as an output. I can make the pin an input and read it; if I disconnect the I2C module on the schematic from the pin, the pin works just fine, so I know my hardware is good. Here's my code: int main() { uint8_t temp = A4_BYP; temp = temp & 0xFE; A4_BYP = temp; A4_SetDriveMode(A4_DM_STRONG); A4_Write(0); for(;;) { A4_Write(1); CyDelay(500); A4_Write(0); CyDelay(500); } } Any ideas? Mike |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
786个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7088 浏览 0 评论
2477 浏览 1 评论
2166 浏览 1 评论
4031 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2074 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7567浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6114浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
742浏览 2评论
710浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
7962浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 10:58 , Processed in 0.608191 second(s), Total 70, Slave 53 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3606