完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛扫一扫,分享给好友
|
您好!
我想把输出方向部分地输出。 当我设置为OEA= OXFF时,我知道,这个方向已经过时了。 但我想另一个别针也有相同的方向。 我怎么能部分地设置? IOA又是什么? 以上来自于百度翻译 以下为原文 Hi I want make output direction partially out and in. When i set to OEA=oxff, as i know, this direction is out. But i think another pin also have same direction. How can i set partially? Also what is IOA ? |
|
相关推荐
7个回答
|
|
|
你好,
我相信这是你正在寻找的:在PATA中,你需要一些引脚作为O/P和一些其他引脚作为I/P引脚。 假设,如果你想要端口A.0作为O/P,其余的引脚作为输入,那么你可以指定: OEA=0x01;//仅PORTA。0作为O/P启用。 同样,如果你想要,比如说POTA。0, 3, 5作为O/P引脚,那么 OEA=0x29;//PORTA.0,3,5作为O/P引脚启用 OEA是端口的O/P使能寄存器。即,通过在OEA中设置适当的位,端口的适当位可以被配置为O/P。 然而,IOA反映了门户的状态。如果您想将任何特定的值赋给POTA的O/P PIN,则将特定值分配给IOA的APPRORITY位。类似地,为了读取PATA的输入引脚的值,可以从IOA的适当位读取它。 说,如果你想做 -PoTa. 0作为O/P引脚并使其高 -波尔塔。1作为I/P PIN并读取其状态。 然后 OEA=0x01;//PORTA。0作为O/P引脚启用。 IOA=0x01;//设置PATA。0为高。 Va≫=IOA&AM0x02;/读状态PATA。1。 我相信这就是你要找的东西。 当做, 加亚特里 以上来自于百度翻译 以下为原文 Hi, I believe this is what you are looking for: in portA , you want some of the pins to act as O/P and some other pins as I/P pins. SAy, if you want port A.0 to act as O/P and rest of the pins as input, then you can assign: OEA = 0x01; // only portA.0 is enabled as O/P Similarly, if you want, say portA.0, 3, 5 as O/P pins, then OEA = 0x29; //portA.0,3,5 enabled as O/P pins OEA is the O/P enable register for portA. i.e. by setting the appropriate bit in OEA, the appropriate bit of portA can be configured as O/P. Whereas, IOA reflects the portA status. If you want to assign any particular value to O/P pin of portA, then assign the particular value to the approriate bit of IOA. Similarly, to read the value at the input pin of portA, you can read it from the appropriate bit of IOA. Say, if you want to make - portA.0 as O/P pin and make it high - PortA.1 as I/P pin and read its status then OEA = 0x01; //portA.0 is enabled as O/P pin IOA |= 0x01; // set portA.0 as high = IOA & 0x02; //read status of portA.1 I believe this is what you are looking for. Regards, Gayathri |
|
|
|
|
|
你好,
IOA是一个寄存器。写入IOA的值出现在被配置为输出的引脚上;从IOA读取的值指示8个引脚的状态,而不管输入/输出配置。参见TRM第183页的IOX寄存器。 OE X寄存器(其中X是A、B、C、D或E),它设置8个引脚中的每一个的输入/输出方向(0=输入,1=OUT PUT)。因此,您可以根据您的需求设置引脚。 当做 普拉吉斯 以上来自于百度翻译 以下为原文 Hi, An IOA is a register. Values written to IOA appear on the pins which are configured as outputs; values read from IOA indicate the states of the 8 pins, regardless of input/output configuration. See IOx register on page 183 of TRM . An OE x register (where x is A, B, C, D, or E), which sets the input/output direction of each of the 8 pins (0 = input, 1 = out-put). So, you can set the pins based on your requirements. Regards Prajith |
|
|
|
|
|
您好!
实际上,如果我想在FX2LP 128AXC中输入输入方向IFCK引脚和SLWR,那么我要做什么设置呢? 以上来自于百度翻译 以下为原文 Hi For acutually, If i want make input direction IFCLK pin and SLWR in FX2LP 128AXC, then what am i do for setting? |
|
|
|
|
|
您好!
实际上,如果我想在FX2LP 128AXC中输入输入方向IFCK引脚和SLWR,那么我要做什么设置呢? 我认为SLWR和IFCK没有被指定为端口PIN。同样,许多引脚也没有分配。 除了PA、PB等端口插针之外。 所以,我怎么做,如IFCK SLWR,FLAGA…等插脚? 以上来自于百度翻译 以下为原文 [size=10.909090995788574px] Hi [size=10.909090995788574px]For acutually, If i want make input direction IFCLK pin and SLWR in FX2LP 128AXC, then what am i do for setting? [size=10.909090995788574px] [size=10.909090995788574px]i think SLWR and IFCLK is not assigned as Port Pin. Also So many pins are also not assigned. [size=10.909090995788574px] [size=10.909090995788574px]except for PA#,PB#,etc...Port Pins. [size=10.909090995788574px] [size=10.909090995788574px]So, how i do such as IFCLK SLWR, FLAGA ... etc pins? |
|
|
|
|
|
你好,
SLWR是FX2LP的输入信号,SLWR引脚应该由Mistin断言,以便将数据写入FIFO。在同步模式(IFCONFIG。3=0)中,FSD-BISIS的数据写入IFFO(FIFO指针递增)在IFLK的每个上升沿上,而SLWR被断言。非异步模式(IFCONFIG 3=1),FD总线的数据写入到FIFO(和FIFO指针递增)上,每个SLWR断言为断言的过渡。默认情况下,SLWR为低电平;其极性可以通过FIFOP极性寄存器改变。 IFCLK既可以用作外部时钟源,也可以用于外部设备提供时钟。IfCONFIG.7在内部和外部源之间选择:0=外部,1=内部。如果选择外部IFCK,它必须在5 MHz的最小频率下自由运行。此外,为了为内部端点FIFO逻辑提供同步,必须在固件集IFCONFIG 7=0之前存在外部IFCK源。 标志引脚是输出引脚,提供了EZ-USB的FIFOS的状态。 当做 普拉吉斯 以上来自于百度翻译 以下为原文 Hi, SLWR is an input signal to FX2LP,SLWR pin should be asserted by the master in order to write data to the FIFO. In synchronous mode (IFCONFIG.3 = 0), data on the FD bus is written to the FIFO (and the FIFO pointer is incremented) on each rising edge of IFCLK while SLWR is asserted. In asynchronous mode (IFCONFIG.3 = 1), data on the FD bus is written to the FIFO (and the FIFO pointer is incremented) on each asserted-to-deasserted transition of SLWR. By default, SLWR is active-low; its polarity can be changed via the FIFOPINPOLAR register. IFCLK can be used either as external clock source or for providing clock to external device. IFCONFIG.7 selects between internal and external sources: 0 = external, 1 = internal. If an external IFCLK is chosen, it must be free running at a minimum frequency of 5 MHz. In addition, in order to provide synchronization for the internal endpoint FIFO logic, the external IFCLK source must be present before the firmware sets IFCONFIG.7 = 0. FLAG pins are out put pins which provides the status of the EZ-USB’s FIFOs. Regards Prajith |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
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 11:51 , Processed in 0.654921 second(s), Total 86, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
463