完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我想从PIC32 MZ(主)数据(16位)发送到6个DAC(DAC88 11)通过SPI协议。在我的SPI中,我选择了不同的CS信号以及每个SPI模块的不同SDO引脚和不同的时钟信号(由相同的PIC32 MZ产生),这是主控。这看起来是正确的还是我只需要使用一个时钟信号来共享?我这样做的基础上,在MPLAB和谐配置器引脚表显示引脚用于每个SPI模块,PIC32 MZ2048 ECH,我正在使用有6个SPI模块,所以我选择了6个不同的信号。你能帮我吗?如果我错了,我可以更换我的印制电路板。谢谢。
以上来自于百度翻译 以下为原文 I want to send from a pic32mz (master) datas (16bits) to 6 dacs (DAC8811) via SPI Protocole. In my SPI I chose different CS signals as well as different SDO pins for each SPI module and different clock signals (generated by the same pic32mz) which is the master. Does that seem correct or do I have to use only one clock signal to be shared ? I did so based on the pin table in MPLAB HARMONY CONFIGURATOR which shows pins to use for every SPI module, pic32mz2048ech that I am using has 6 SPI modules so I did chose 6 differents signals. Can you please help me so tha ti can change my PCB if I'm wrong. Thank you . |
|
相关推荐
10个回答
|
|
图像URL:HTTPS://EndoMo.COM/WP-内容/上载/2017/04/SPI-SM和多SLaveChansNo.PNG.这是您应该如何配置单主和多从模式。您可以使用GPIO引脚为SSX(从选择)。
以上来自于百度翻译 以下为原文 Image url : https://electrosome.com/wp-content/uploads/2017/04/SPI-Master-and-Multi-Slave-Connections.png This is how you should configure single master and multi-slave mode. You can use GPIO pins for SSx(Slave Select). |
|
|
|
对不起,我看不到这张照片,你能在附件里加上吗?非常感谢你。
以上来自于百度翻译 以下为原文 I am sorry but I can't see the picture , can you please add it in attachment ? thank you so much |
|
|
|
这是奇怪的,我可以看到它。图像是AtTPSP//EndoMc/COMP/WP-内容/上传/ 2017/04/SPI Mrand和Sulva-CouthNo.PNG。
以上来自于百度翻译 以下为原文 That's strange, I can see it fine. The image is at https://electrosome.com/wp-content/uploads/2017/04/SPI-Master-and-Multi-Slave-Connections.png |
|
|
|
好的,这是我在每个网站中找到的配置。但在我的例子中,我想把不同的数据发送给每个奴隶(比如说2个奴隶)。所以我使用了不同的SCLK引脚和不同的MOSI引脚和SS引脚,对我来说使用不同的MOSI引脚似乎是合乎逻辑的,因为数据对于两个奴隶都是不一样的:当第一个从接收第一个2字节,第二个接收2个其他字节时,我想发送4字节的数据。你认为我应该给你推荐别针吗?谢谢
以上来自于百度翻译 以下为原文 Okay this is the configuration I find in every website. But in my case I want to send different datas to each slave (let's say 2 slaves at first). so I used different sclk pins and different MOSI pins and SS pins as well, it seems logical to me to use different MOSI pins cause the data won't be the same for both slaves : I want to send 4bytes data when the first slave receives the first 2 bytes and the second receives the 2 other bytes. Do you think I should assign pins as you recommended anyway ? thanks |
|
|
|
我认为你误解了SPI是如何工作的,只有SS拥有的奴隶才会接收到数据。你必须一次和他们说一次,不需要单独的MoSI和MISO。
以上来自于百度翻译 以下为原文 I think you are misunderstanding how SPI works. Only the slave that has SS asserted will receive the data. You have to speak to them one at a time. There's no need to have separate MOSI and MISO. |
|
|
|
是的,我理解你所说的,但是如果我想同时把DATA1发送到从机1和DATA2到从机2,但是我有一个MISO信号,在这两个之间共享,在这种情况下我能做什么?
以上来自于百度翻译 以下为原文 Yes I understand what you say, but if I want to send data1 to slave 1 and data2 to slave 2 at the same time, but I have one MISO signal that is shared between the two , what can I do in this case ? |
|
|
|
你说的“同一时间”究竟是什么意思?写一个,另一个,不到一毫秒是正常的。如果你需要精确的同步,写在同一纳秒,那么你必须使用多个SSP外围设备。
以上来自于百度翻译 以下为原文 What exactly do you mean by "at the same time" ? It's normal to write to one, then the other, all in less than one millisecond. If you require exact synchronisation, writing at the same nanosecond, then you have to use multiple SSP peripherals. |
|
|
|
我之所以这么说是因为我已经用PIC32(Master)做了PCB,有6个奴隶(DAC),所以我使用了不同的SCLK引脚和MOSI引脚,正如我所说的,所以我想知道我做的是正确的,这样我就可以改变它。通过多个SSP外围设备,你到底是什么意思?
以上来自于百度翻译 以下为原文 I am saying that because I already made my pcb with pic32 (master) with 6 slaves (DACs) so I used different sclk pins and MOSI pins as I said so I want to know if what I did is correct so that I can change it if not. By multiple SSP peripheral what do you exactly mean ? |
|
|
|
你似乎在使用6个不同的SPI主模块,对吧?如果你在这里发布你的SPI相关的连接,这将是有益的,这样我们就可以完全理解它。
以上来自于百度翻译 以下为原文 you seem to be using 6 different SPI MASTER modules, aren't you? it will be helpful if you post your SPI related connections from ur pcb here, so that we can exactly understand it. |
|
|
|
是的,实际上我的导师确认我必须使用六个SPI模块,这样我就可以同时向CNAS发送数据。现在,我只想使用一个一个从一个架构来实现CNAS。因此,我想每次发送16位数据(使用UDP/IP和PACKEST发送器工具),从这些样本中,我想构成一个周期性的信号,我发送给CNA。直到现在,我成功地接收了PACKEST发送者发送的数据,但是剩下的No,我可以发布我的代码,即使它不正确,我知道,但我只是想告诉你我想要什么样的东西,希望你能引导我通过。多谢。
以上来自于百度翻译 以下为原文 Yes actually my tutor confirmed that I have to use the six SPI modules so that I can send datas to CNAs at the same time. Now I just want to do so for one of the CNAs using 1master-1slave architecture. So I want to send 16bits datas(using UDP/IP and packest sender tool) each time and from these samples I want to constitute a periodic signal which I send to cna. Til now I succeded to receive data sent by packest sender but the rest no. I can post my code later even if it's not correct I know but I just want to show you how I want things to be like, and hope yo can guide me through. Many thanks. |
|
|
|
只有小组成员才能发言,加入小组>>
5166 浏览 9 评论
2000 浏览 8 评论
1929 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3175 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2227 浏览 5 评论
736浏览 1评论
619浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
507浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
633浏览 0评论
530浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 09:22 , Processed in 1.461835 second(s), Total 97, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号