完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
当我使用立方体ICE和21x34 POD实践修改IO端口时,POD只将P17连接到电压表,没有其他外部组件。代码让我迷惑。(P.S.设计者5)---------------------------------------------------------PRT0GS和= ~0x08;/ /与全局总线PRT0DM2=0x08断开;PRT0DM1&=0x08;//DM(2:0]=100,慢强高,高Z低PRT0DM0&AMP= ~0x08;PRT0DR和= ~0x08;PRT3GS和=0x02;/ /与全局总线PRT3DM2=0x02断开;PRT3DM1&AMP= ~0x02;//DM(2:0]=100,慢强高,高Z低PRT3DM0和;= ~0x02;PRT3DR=0x02;---------------------------------------------------------------P17被修改为低NORMA。LLY,然后修改p31,p17变高。谁能告诉我为什么?拜托。我忘了P17和P31都连接到模拟总线……忘掉我的愚蠢。
以上来自于百度翻译 以下为原文 When i use cube ice and 21x34 pod practice modify IO port, Pod only connect P17 to voltage meter, no other external component. the code make me confuse. (PS. Designer 5.0) ------------------------------------------------------------------------------------------------ PRT0GS &= ~0x08; //disconnect from global bus PRT0DM2 |= 0x08; PRT0DM1 &= ~0X08; //DM[2:0]=100, Slow strong high, high-z low PRT0DM0 &= ~0x08; PRT0DR &= ~0x08; PRT3GS &= ~0x02; //disconnect from global bus PRT3DM2 |= 0x02; PRT3DM1 &= ~0x02; //DM[2:0]=100, Slow strong high, high-z low PRT3DM0 &= ~0x02; PRT3DR |= 0x02; ----------------------------------------------------------------------------------------------- P17 is modified to low normally, then modify P31 , P17 become high..... Can any one tell me why ? please. ===================================================== I forget the P17 and P31 both connect to analog bus.... Forget my stupidity. |
|
相关推荐
1个回答
|
|
|
嗨,我不知道完整的应用在这种情况下你做的是什么。但我可以解释这些代码行在做什么。prt0gs &;= ~ 0x08;/ /断开从全球汽车prt0dm2 | = 0x08;prt0dm1 &;= ~ 0x08;/ / DM [2:0] = 100,慢强高,高阻低prt0dm0 &;= ~ 0x08;prt0dr &;= ~ 0x08;它将断开引脚P0 [ 3 ]从全局总线是否连接前。然后它将改变P0 [ 3 ]开漏极驱动高驱动模式。然后,P0 [ 3 ]转向高阻抗输出写入“0”的数据登记。prt3gs &;= ~ 0x02;/ /断开从全局总线prt3dm2 | = 0x02;prt3dm1 &;= ~ 0x02;/ / DM [2:0] = 100,慢强高,高阻低prt3dm0 &;= ~ 0x02;prt3dr | = 0x02;它将断开销[ 1 ]从P3全局总线如果是连接前。然后它将改变为P3 [ 1 ]开漏极驱动高驱动模式。然后P3 [1 ]转向高输出通过写“1”其数据登记。最好的问候,Sachin Gupta
以上来自于百度翻译 以下为原文 Hi, I do not know what is complete application and in which context you are doing it. But I can explain what these lines of code are doing. PRT0GS &= ~0x08; //disconnect from global bus PRT0DM2 |= 0x08; PRT0DM1 &= ~0X08; //DM[2:0]=100, Slow strong high, high-z low PRT0DM0 &= ~0x08; PRT0DR &= ~0x08; It will disconnect pin P0[3] from global bus if it was connected earlier. Then it will change drive mode for P0[3] to open drain drive high. Then P0[3] is turned to High-Z output by writing a '0' to its data register. PRT3GS &= ~0x02; //disconnect from global bus PRT3DM2 |= 0x02; PRT3DM1 &= ~0x02; //DM[2:0]=100, Slow strong high, high-z low PRT3DM0 &= ~0x02; PRT3DR |= 0x02; It will disconnect pin P3[1] from global bus if it was connected earlier. Then it will change drive mode for P3[1] to open drain drive high. Then P3[1] is turned to High output by writing a '1' to its data register. Best regards, Sachin Gupta |
|
|
|
|
只有小组成员才能发言,加入小组>>
786个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7088 浏览 0 评论
2474 浏览 1 评论
2166 浏览 1 评论
4031 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2073 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7566浏览 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 03:12 , Processed in 0.728288 second(s), Total 72, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1422