完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我有一个项目,一个PIC24FJ256GB210是一个I2C主控器,一个PIC16F18326,一个I2C从机和一个I2C EEPROM。所以,在特殊情况下,必须有可能PIC16给PIC24一个“中断”,他有一个重要的消息为PIC24。有没有这样做的方式没有轮询从PIC24?I2C主机可以检测到另一个主控器启动了一个带有起始位的消息吗?谢谢!
以上来自于百度翻译 以下为原文 Hi, i have a project where a PIC24FJ256GB210 is an I2C Master, a PIC16F18326 an I2C Slave and an I2C EEPROM. So, in special circumstances it must be possible that the PIC16 gives the PIC24 an "Interrupt" that he has an important message for the PIC24. Is there a way to do this without polling from the PIC24? Can an I2C Master detect that another master initiated a message with a start bit? Thanks! |
|
相关推荐
11个回答
|
|
我用这种方法做了类似的事情:使I2C时钟引脚在需要时注意改变,它在CKKY上发送一个小脉冲,然后由主机执行标准I2C操作,最后回到软件中使用I2C的“中断模式”(BIT BAN),因此APPACH有点容易实现,但也应该与I2C硬件一起工作。
以上来自于百度翻译 以下为原文 I did something similar using this method:
I was using I2C in software (bit bang) so this approach was a little bit easier to implement, but should work with I2C hardware too. |
|
|
|
嗨,达里奥,这是一个很好的借口,我来测试一下!谢谢!
以上来自于百度翻译 以下为原文 Hi Dario, this is a good aproach. I will test it! Thanks! |
|
|
|
嗨,不幸的是,主I2C必须被禁用以获得CN中断。如果从主站保持SCK线路低而主通信,主机会检测到总线通信吗?
以上来自于百度翻译 以下为原文 Hi, unfortunately the Master I2C must be disabled to get the CN interrupt. Will the Master detect a bus collosion if the slave holds the sck line low while the master communicate? |
|
|
|
I2C支持多个主控器。只要参考I2C规范的“多主”部分。
以上来自于百度翻译 以下为原文 I2C does support multiple masters. Just refer to the "multi-master" sections of the I2C specification. |
|
|
|
嗨,我可以检测到总线通信,如果主传输和奴隶持有SDA线。存在一种方法,在“空闲”的主人承认传输从另一个主人?
以上来自于百度翻译 以下为原文 Hi, i can detect a bus collosion if the master is transmitting and the slave holds the SDA Line. Exist a method that the master in "IDLE" recognize a transmission from the other Master? |
|
|
|
事实上,我在不使用时,禁止禁用I2C主机。
以上来自于百度翻译 以下为原文 I was in fact supposting of disabling Master I2C when not used... |
|
|
|
它在I2C硬件中得到了充分的支持,阅读了PIC24系列参考手册“互集成电路”(I2C SUM),特别是:“6在多主环境中作为主机通信”。
以上来自于百度翻译 以下为原文 It is all fully supported in the I2C hardware. Read the PIC24 Family Reference Manual "Inter-Integrated Circuit™ (I2C™)", particularly: "6.0 Communicating as a Master in a Multi-Master Environment" |
|
|
|
在I2C硬件上都得到了充分的支持。阅读PIC24系列参考手册“内部集成电路SUM(I2C SUM)”,特别是:“6在多主环境中作为主机通信”,手册上说可以检测到1总线汇流。开始条件2。一个重复的启动条件3.地址,数据或确认比特4。一个停止条件,但是如果主机没有任何事情做,它不能认识到另一个主要给他发送消息,直到第一个主处于SOLVE模式。
以上来自于百度翻译 以下为原文 It is all fully supported in the I2C hardware. Read the PIC24 Family Reference Manual "Inter-Integrated Circuit™ (I2C™)", particularly: "6.0 Communicating as a Master in a Multi-Master Environment" The manual says that a bus collosion can be detected at 1. A Start condition 2. A Repeated Start condition 3. Address, Data or Acknowledge bit 4. A Stop condition But if the Master has nothing to do it can't recognize that the other master want to send him a message until the first master is in salve mode. |
|
|
|
你误会了我。我没有解释如何检测到总线冲突。我是说I2C外围设备完全支持多个主机。它可以同时充当主站和从站,所以第二个主机只需等待总线空闲,然后用正常的I2C通信向第一个主机写入。如果你只是花时间阅读我提到的家庭参考手册,这一切都会变得清晰。
以上来自于百度翻译 以下为原文 You misunderstood me. I was not explaining how to detect a bus collision. I was saying that the I2C peripheral fully supports multiple masters. It can act as both a Master and a Slave at the same time, so the second Master just has to wait until the bus is idle, and then write to the first Master using normal I2C communication. This should all become clear if you just took the time to read the Family Reference Manual I mentioned. |
|
|
|
好的,我想我没有表达清楚。我们有一个主(PIC24)和两个奴隶(PIC16和EEPROM)在公共汽车上。问题是PIC16奴隶如何指示主人他有信息?正如DarioG提到的,在主通信时,我可以使用一个PIN更改中断,但是如果主控制器与EEPROM通信,PIC16应该能够中断PIC24和EEPROM之间的通信。具体地说,我需要在SDA或SCL线路上进行伪SMB报警。
以上来自于百度翻译 以下为原文 Ok, i think I have not expressed myself clearly. We have one master (PIC24) and two slaves (PIC16 & EEPROM) on the bus. The question is how the PIC16 slave can indicate the master that he has a message? As DarioG mentioned i can use a pin change interrupt while the master is not communicate. But if the master communicate to the eeprom the PIC16 should be able to interrupt the communication between the PIC24 and the EEPROM. Specifically, I need a pseudo SMB Alert over the SDA or SCL line. |
|
|
|
当PIC24与EEPROM对话时,您想停止传输吗?如果你能等到一个停止(即当公共汽车变空闲),那么你可以做我已经描述过的事情。也就是说PIC16自己进入主模式,并把它作为一个奴隶写到PIC24。我不知道我能说多少方法。
以上来自于百度翻译 以下为原文 Do you want to be able to stop the transmission while the PIC24 is talking to the EEPROM? If you can wait until a STOP (i.e. when the bus becomes idle), then you can just do what I already described. i.e. the PIC16 goes into Master mode itself, and writes to the PIC24 as a slave. I don't know how many ways I can say that you CAN do that. |
|
|
|
只有小组成员才能发言,加入小组>>
5238 浏览 9 评论
2028 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3204 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
772浏览 1评论
664浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
590浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
672浏览 0评论
572浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 16:52 , Processed in 1.593908 second(s), Total 96, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号