I am developing an embedded product, and I need to talk to it using the MPU's SPI interface. I have been looking around for a cheap PCI card that has an SPI interface on it but I am having a hard time finding one that is not a programmer. Does anyone have any recommendations for a card that I could use to send and receive bytes to my MPU (ie. a simple card with a bidirectional DLL driver) ?
How fast do you want to talk over SPI? I presume you are attempting to talk to it from a PC. What operating system? Any particular reason you want SPI as the interface from the PC to the embedded target, (kind of strange)? It might be easier to bit-bang asynchronous communications.
I've seen PC-SPI before using a line from a serial port, (Circuit Cellar) but you'll still needed an electric voltage conversion, (schematic in article). It was very slow, but that application only needed 32 bits at 7.5Hz. There is Win32 C code in the article. See:
If you buy something off the shelve for $295 see:
Or if you are proficient with microcontrollers you could buy any off the self board for $25-$49 (TI,Microchip, Atmel...) and program your own converter.
But if you are willing to do this and have the capacity on your embedded product, then I'd just bit-bang the asynchronous comm on your target, (pretty easy to do and lots of example code available).
I want to go with SPI because "in theory" I will be able to talk @
25 Mbps. At those speeds my MPU will need to pause the transmission when its buffer is full. USB has high bandwidth but high latency, so I was thinking a PCI card would work better for my application. A few months ago I saw a small website that had a simple PCI SPI card, but I lost the link, and I can't find it with google or yahoo, so I was hoping someone here might of it or another one.
Thanks for the reply and I will keep the Aardvark in mind if I can't locate a PCI version, Phil
talk to it from a PC. What operating system? =A0Any particular reason you wa= nt SPI as the interface from the PC to the embedded target, (kind of strange= )? =A0It might be easier to bit-bang asynchronous communications.
but you'll still needed an electric voltage conversion, (schematic in articl= e). It was very slow, but that application only needed 32 bits at 7.5Hz. =A0= There is Win32 C code in the article. =A0See:
elf board for $25-$49 (TI,Microchip, Atmel...) and program your own converte= r.
roduct, then I'd just bit-bang the asynchronous comm on your target, (pretty= easy to do and lots of example code available).
I need a low pin count, full duplex interface. It also has to be incredibly fast because I have to program a 256 MB NAND flash chip. SPI is the best choice for me because my MPU can operate at 25 Mbps in master mode ! I have I2C and UART ports available too, but they are not as fast as SPI.
Thanks for the tip, I am hoping I will not have to make my own boards or write my own low level device driver like you suggested. I did this before for another project, and it worked well, but I would rather buy the card from another company to save the labor.
I am programming a 256 MB flash chip. So the faster the better :)))
My MPU can pound out 25 Mbps in SPI master mode, so I was hoping to get something that could do at least 10 Mbps. In the worst case I could buy a blank PCI interface card and install a sister version of my MPU in it, BUT my MPU is capped at 4.5 Mbps in slave mode, so I would be doing a lot work to get a slower interface.
I saw the other posts and your responses. "In theory" and " talk @ 25 Mbps." over SPI on a cable interface don't go together. SPI is intended for very short distances, i.e., typically on a single board. Noise will become a significant issue on any cable at all. At a minimum be prepared to use twisted pairs, maybe a piece of Cat 5 cable to make this work.
If you can use USB take a look at the LabJack. We used those for SPI, around $100, has nice screw terminals for the SPI wires and the little box itself can also be bolted down. You can pick any color as long as it is red :-)
Might want to check how fast the chip will let you program it. Especially how "slow" it will let you erase it.
I would guess most of the PC-based SPI widgets you can get are going to be SPI masters not slaves.
And while USB has high latency, to move data at the kinds of rates you seem to want to you are going to have to pipeline the process, so learning to program across USB latency may not be a deal breaker - basically, you want to keep shoving data through and get deferred acknowledgement of success sometime later, not keep waiting on acknowledgement.
I guess once I try running it at this speed, my SPI cable length will have to be so short, I will end up having to use a USB device after all. I will have to come up with a protocol that only sends a single 2K flash page at a time. The USB host would wait for an acknowledgment before sending the next page ...
I can do this and it is probally a good way to go too, so thanks for the advice. Everybody here really helped me out ...
If the SPI hardware side acts up at that speed you might want to add some AC termination so the signals arriving at the NAND chip look somewhat clean. A few ten pF in series with a resistor close to the cable impedance should do.
If you want to buy pre-built USB hardware that uses an FTDI 2232, try the Olimex JTAG USB OCD ($70 USD) and available from
This interface is targeted toward the JTAG interface on ARM microcontrollers. However, JTAG and SPI have a fairly equivalent signal set: TMS/CS, TCK/SPICK, TDI/DI, TDO/DO. Thus, the hardware supports the SPI format also.
While you can talk SPI using the baseline D2XX drivers, FTDI has an SPI driver along with a sample application that talks to a small SPI EEPROM. If you want to transfer lots of data (and you do), then you will want to use the buffered write capability. I did have a problem when trying to use the buffered read capability, where I was getting an error that shouldn't happened.
If you want to plug in the hardware and interface to an SPI DLL, I'd probably spend the $300+ on a dedicated USB/sync serial pod. If your time is money, you'll be ahead of the game with a pre-engineered solution.