简体   繁体   English

SPI接口3线串行Si471X

[英]SPI interface 3-wire serial Si471X

I tried to find an answer to this question by searching SDIO which is related to my question based on Silicon Labs naming of data channels. 我试图通过Silicon Labs数据通道命名来搜索与我的问题有关的SDIO,从而找到该问题的答案。 However, I was flooded with topics related to the SDIO protocol for serial comms with an SD memory card - a totally different concern. 但是,我充斥着与SDIO卡进行串行通信的SDIO协议相关的主题-完全不同的关注点。

I want to interface a PIC MCU (SPI bus) with Silicon Labs FM TX/RX 47XX chips which describe a serial control interface and the multiple ways to use it - what they call 2-wire (basically I2C) or what they call 3-wire and refer to as "SPI". 我想将PIC MCU(SPI总线)与Silicon Labs FM TX / RX 47XX芯片接口,这些芯片描述了串行控制接口以及多种使用方式-他们称之为2线(基本上是I2C)或所谓的3-连接并称为“ SPI”。 The 3 lines are SLCK, SEN and SDIO (clock, enable, and data input/output half-duplex over the same wire). 3条线是SLCK,SEN和SDIO(同一条线上的时钟,使能和数据输入/输出半双工)。

My problem is that SPI is full duplex capable - TX and RX simultaneously. 我的问题是SPI具有全双工功能-同时发送和接收。 Even though every implementation I've seen of this is really half-duplex - send then receive - the hardware is wired with SDI/SDO or MISO/MOSI or called whatever lines in the SPI module; 即使我所见过的每个实现实际上都是半双工的-先发送后再接收-硬件通过SDI / SDO或MISO / MOSI进行布线,或者在SPI模块中称为任意线路; a separate data IN and a data OUT wire. 单独的数据输入和数据输出线。 Along with SCLK and SEN (clock and enable). 以及SCLK和SEN(时钟和使能)。

I'm not sure how to wire this up - and whether it will work. 我不确定如何进行连接-以及是否可以正常工作。 Do I wire both the SDI and SDO pins of the PIC (SPI module) to the same SDIO on the Si47XX? 是否将PIC(SPI模块)的SDI和SDO引脚都连接到Si47XX上的同一SDIO? Since the Si47XX is half-duplex that would make sense; 由于Si47XX是半双工的,因此很有意义。 but I've never seen the two lines tied on an SPI interface. 但我从未见过将两条线绑在SPI接口上。 Not sure if the pins are always Hi-Z for example and I don't want to fry something out. 例如,不确定引脚是否始终为Hi-Z,并且我不想炸出东西。 Would I need to add pull ups/downs? 我需要增加上拉/下拉吗?

Oddly, I can't seem to find an actual wiring diagram of such a case. 奇怪的是,我似乎找不到这种情况的实际接线图。 When I search 3-wire SPI I always get examples where SEN is tied since only one slave device is being used - not my situation. 当我搜索3线SPI时,我总是会看到SEN绑定的示例,因为仅使用了一个从属设备,而不是我的情况。 Any advice would be - as always - greatly appreciated. 一如既往,任何建议将不胜感激。 -Rick -里克

One can interconnect SPI and 3-wire devices using the following schematic. 可以使用以下原理图互连SPI和3线设备。 It does not matter which device is master and which is slave. 哪个设备是主设备,哪个设备是从设备并不重要。

SPI device             3-wire device
----+
SDO |--/\/\/\-+  3k
    |         |        +---
SDI |---------*--------| SDIO
    |                  |
SCK |------------------| SCK
SEN |------------------| SEN
----+                  +---

If a 3-wire device is in reception state, then SDO signal comes via resistor to (Hi-Z) SDIO pin and back to SDI pin. 如果三线设备处于接收状态,则SDO信号通过电阻到达(Hi-Z)SDIO引脚,再回到SDI引脚。 If the 3-wire device is in transmission state, then SDIO output overrides SDO value. 如果3线设备处于传输状态,则SDIO输出将覆盖SDO值。

The example of such connection one can see in FTDI datasheet for FT2232H , page 37 (Figure 4.1RS232 Configuration) — 93С46 to FT2232H connection. 这种连接的示例可以在FT2232H的 FTDI数据表中的第37页(图4.1RS232配置)中看到-93С46到FT2232H的连接。

At lower SPI frequencies one can use higher resistor value for lower overriding current. 在较低的SPI频率下,可以使用较高的电阻值来降低上覆电流。 It's depend also from traces length but in usual cases 3k is in very good marging for frequences up to 2 MHz. 它也取决于走线的长度,但在通常情况下,对于高达2 MHz的频率,3k的裕度很小。


ps It seems that the question is not about programming. ps似乎问题不在于编程。 Could it be moved to electronics.stackexchange.com? 可以将其移至electronics.stackexchange.com吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM