完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
考虑,IAM试图通过双向电平转换器将PIC18F45 50连接到NoDEMCU。所有线路都有4K7的外部上拉电阻,问题是PIC侧的SCL线路不会完全变低。它去,大约,0.75 VCC。SDA线路性能正常,I2C寄存器配置如下:IAM有点丢失。我已经尝试了其他上拉值(1K2,10K,12K)。任何线索!谢谢!!
以上来自于百度翻译 以下为原文 regards, Iam trying to connect a PIC18F4550 to a nodeMCU through a bidirectional level converter. All lines have 4k7 external pull-up resistors. The problem is that the SCL line on the PIC side is not going entirely low. It goes to, approx, 0.75Vcc. The SDA line behaves normally. The I2C registers are configured as follow: INTCON2bits.RBPU = 0; //internal pull up off TRISBbits.RB0 = 1; //Setting as input TRISBbits.RB1 = 1; //Setting as input SSPADD = 21; SSPCON1 = 0b00111110; SSPCON2bits.SEN = 1; //rb0 n rb1 (scl sda) analog inputs off. ADCON1bits.PCFG3 = 0; ADCON1bits.PCFG2 = 1; ADCON1bits.PCFG1 = 0; ADCON1bits.PCFG0 = 1; GIE = 1; PEIE = 1; SSPIF = 0; SSPIE = 1; Iam a little bit lost. I have tried other pull-up values (1k2, 10k, 12k). Any clues!? Thanks!! |
|
相关推荐
6个回答
|
|
什么和谁的双向电平转换器?ADUM在次级侧上有一个接地偏移。是从转换器或PIC的转变?PIC应该在其反应上拉低。
以上来自于百度翻译 以下为原文 What and whose bidirectional level convertor? The adum ones do have a ground shift on the secondary side. Is the shift from the converter or the PIC? The pic should be pulling full low on its responses. |
|
|
|
嗨,你说的是0.75 VCC是什么意思?0.75 V可以是有效的低输入信号。当VCC为3.3 V时,0.75×VCC为2.5 V,当VCC为5 V时VCC为3.7 V。对于I2C,使用低电平输出信号电平在0.4和0.8 V之间的一些桥式和中继器,以便不将其自身锁定为永久低状态。PUTTS集线器/双双向总线缓冲器:P82B96?Tab=文档2中的I2C器件之间的电压转换可以用单个MOSFET晶体管对每个信号线进行。HTP://www. NXP.COM/Dopunts/AppultIsNOTE/AN1044 1.PDF,Mysil
以上来自于百度翻译 以下为原文 Hi, What do you mean by 0.75Vcc ? 0.75 V may be a valid Low input signal. 0.75 * Vcc is 2.5 V when Vcc is 3.3 V, or 3.7 V when Vcc is 5 V. There are some types of bridges and repeaters for I2C that use low level output signal level between 0.4 and 0.8 V, in order to not lock itself into a permanent Low state. http://www.nxp.com/products/interfaces/ic-bus-portfolio/ic-bus-repeaters-hubs-extenders/dual-bidirectional-bus-buffer:P82B96?tab=Documentation_Tab Voltage translation between I2C devices may be done with a single MOSFET transistor for each signal line. http://www.nxp.com/documents/application_note/AN10441.pdf Regards, Mysil |
|
|
|
我的意思是3/4的VCC;0.75 *VCC。在我的例子中,因为在我的DEV板中有一个二极管保护,VCC=4.3V。所以Z-GT;4.3V;低-gt;3.23伏。问题正是在电平移位器中。我用两个2N2222做了一个快速的工作。至少是水平。现在IAM有一个问题,其中ISR处理程序被无缘无故地调用:S。
以上来自于百度翻译 以下为原文 I meant 3/4 of Vcc; 0.75*Vcc. in my case, because of a diode protection in my dev board, Vcc=4.3V. So Z->4.3V; Low->3.23V . The problem was precisely in the level shifter. I made a quick one with two 2n2222 and got it working. At least the levels. Now Iam having a problem in which the ISR handlers is been called for no reason :S . |
|
|
|
I2C上的电平移动是双向开漏。它不像5月1日出现的那么简单。这两个系统的电压是多少?3.3和5兼容高达3.3伏。
以上来自于百度翻译 以下为原文 Level shifting on I2C is Bidirectional Open Drain. It is not as simple as it may first appear. What are the voltages of the two systems. 3.3 and 5 are compatible pulled up to 3.3 Volts. |
|
|
|
我没想过这件事。甚至,因为我的5V实际上是4v2到3v3更接近于指定标准的0.7*VDD。
以上来自于百度翻译 以下为原文 I didn thought about that. Even more, as my 5V are actually 4V2 to 3V3 is far closer to the 0.7*Vdd that specifies the standard. Ill give it a try |
|
|
|
许多PIC器件可根据SMBus规范选择输入信号检测电平,这些电压被指定为相对于VSS的电压,独立于电源电压VDD 3.3或5 V。在大多数MSSP外围设备中,此设置隐藏在SSPSTAT寄存器位6 SSPSTATBITS.CKE=1;*启用SMBus特定输入。*这应该允许I2C信号被拉到3.3 V,被VDD 5 V驱动的设备正确检测,即使没有电平转换器。还有一些其他的陷阱,当使用I2C时可能会引起混淆。如果仍然有问题,你将需要更多地讲述你正在尝试什么。去做,你的观察是什么,你试图运行什么代码。或者你可以试着在这些论坛中搜索,类似的初学者问题已经被讨论了很多次。
以上来自于百度翻译 以下为原文 Many PIC devices have the option to select Input signal detection levels according to SMBus specification. These are specified as voltages relative to Vss , independent of supply voltage Vdd 3.3 or 5 V. In most MSSP peripherals, this setting is hidden in SSPSTAT register bit 6 SSPSTATbits.CKE = 1; /* Enable SMBus specific inputs. */ That should allow I2C signals pulled up to 3.3 V, to be correctly detected by devices powered by Vdd 5 V, even without level translators. There are some other pitfalls, that may cause confusion when trying to use I2C. If there still is a problem, you will need to tell more about what you are trying to do, what your observasions are, and what code you are trying to run. Or you may try searching in these Fora, similar beginners trouble have been discussed many times. Regards, Mysil |
|
|
|
只有小组成员才能发言,加入小组>>
5237 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3201 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
772浏览 1评论
662浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
590浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
672浏览 0评论
572浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 15:48 , Processed in 1.322509 second(s), Total 86, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号