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) ?
Thanks,
Phil
Phil,
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:
http://www.sampledsystems.com/pdfs/SynchronousComm.pdf
If you buy something off the shelve for $295 see:
http://www.protocolanalyser.com/spispec.htm
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).
How fast does this need to go ?
FTDI have SPI modes in their chips, so they would seem a
natural solution.
http://www.ftdichip.com/Products/FT2232C.htm
Parallel port bit-bang also works, but will be slower.
-jg
Does it have to be PCI? TotalPhase sell the Aardvark SPI widget but
that uses USB.
Andrew
Hi Andrew,
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
Hi,
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.
Hi Jim,
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.
Thanks,
Phil
Scott
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 :-)
--
Regards, Joerg
> I am programming a 256 MB flash chip. So the faster the better :)))
Might want to check how fast the chip will let you program it.
Especially how "slow" it will let you erase it.
> My MPU can pound out 25 Mbps in SPI master mode
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.
Hi cs_post... and Andrew Jackson,
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 ...
Take Care,
Phil
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.
I recently did 20MHz SPI over about 3ft with telephone wire because
there was no spare spool of CAT-5 at that client. Worked.
Thanks for the advice,
I will definately use it if I have any noise problems.
Phil
> Does it have to be PCI? TotalPhase sell the Aardvark SPI widget but
> that uses USB.
Or even ethernet. I program my SPI (or EzPort) device over ethernet.
Petter
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Then you could also look at some simple compression ?
Is the Flash always full, and what data is going into the Flash ?
- also what is the FLASH write bandwidth ?
> 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.
If this is one-way, USB will be ok, as the latency issues there
mainly mess-up ping-pong type designs.
-jg
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.
urb