完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好!我试图在静态2.04中使用静态I2C驱动程序,经过一天的工作,我甚至不能使SCL/SDA线处于空闲状态,更不用说传输任何东西(简单地切换PIOS是有效的),但是我的设置是PIC32嵌入式连接,带有PoC3的浮点启动器套件,它具有PIC3。船上2MZ2048 EFM144。目前,没有一个奴隶。我试着在引脚85, 66上添加一个I2C,这是初学者工具包上J12连接器上的引脚3和5。我把它定义为“主”、“静态”、“无中断”。需要什么样的函数调用才能使它发送一个字节?(在这一点上,尤其是没有人。我只是用一个示波器来听)你能给我一个以下的例子:1。一系列函数调用,我需要在MeST()后面SyrSyPrimalI化(NULL)(它调用DRVIII2C0IILIALALIZE())中调用,以使它在地址0x502中向字节发送一个字节'0xAA'。一个简单的项目,它所做的只是发送字节与一个静态驱动程序,并与和谐2.04提前感谢!
以上来自于百度翻译 以下为原文 Hello, all! I'm trying to use static I2C driver in HARMony 2.04, and after a day of work, I can't even get the SCL / SDA lines to be up in idle state, let alone transmit anything (simply toggling the PIOs is working, though) My setup is pic32 embedded connectivity with floating point starter kit, which has a pic32mz2048efm144 on board. currently, without a slave. I tried adding a single I2C on pins 85, 66, which are pins 3 and 5 on the j12 connector on the starter kit. I defined it as master, static, no interrupts. what series of function calls do I need to do to get it to transmit a single byte? (at this point, to no-one in particular. I'm just listening with an oscilloscope) Can you please give me one of the following: 1. a series of function calls I need to make in main() after SYS_Initialize ( NULL ) (which calls DRV_I2C0_Initialize()), to get it to transmit byte '0xaa' to a slave at address 0x50 2. A simple project that all it does is just transmit bytes with a static driver, and working with Harmony 2.04 Thanks in advance! |
|
相关推荐
4个回答
|
|
首先,SDA和SCL线有上拉电阻吗?这是I2C的要求。看起动器工具箱的原理图,它看起来不像你正在使用的引脚(SDA2/SCL2)在船上有拉力。你需要自己添加它们。
以上来自于百度翻译 以下为原文 First things first, do the SDA and SCL lines have pull-up resistors? That's a requirement for I2C. looking at the schematic for the starter kit it does not look like the pins you are using (SDA2/SCL2) have pull-ups onboard. you will need to add them yourself. |
|
|
|
|
|
|
|
HI尝试相同的传输在静态模式下使用I2C没有成功和拉电阻OK。你能分享你用来执行传输的函数调用吗?我使用中断而不是静态运行传输。
以上来自于百度翻译 以下为原文 Hi I try the same to transmit using I2C in static mode without success and pull up resistors OK. Could you share the function calls you used to execute a transmission? I get a transmission running using interrupt but not static. |
|
|
|
你好,蓬图斯,那个代码是一个试验,已经很长时间了,抱歉。可惜我现在没有时间来复制它,现在我踢我自己不把它放在第一位。如果你设法解决它,请做一个社区的青睐,并发表在这里,因为I2C总是一个痛苦得到WOR。国王正确。
以上来自于百度翻译 以下为原文 Hello Pontus, That code was a trial and long gone, sorry. Unfortunately I currently have no time to reproduce it, and now am kicking myself for not putting it here in the first place. If you manage to work it out, please do the community a favor and publish it here, as I2C was always a pain to get working properly. |
|
|
|
只有小组成员才能发言,加入小组>>
5036 浏览 9 评论
1935 浏览 8 评论
1872 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3088 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2157 浏览 5 评论
597浏览 1评论
465浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
493浏览 0评论
395浏览 0评论
IPECMD命令烧录AVR128DA48芯片,报找不到芯片错误
874浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-9-2 22:13 , Processed in 1.148257 second(s), Total 53, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191