Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI protocol using 6062E DaqCard

Hello every body, I hope you can help me, because really need it.

 

I have a NIdaqCard 6062E, and I need to implement some kind of SPI protocol.

 

I have tried to use SPI digital waveform library with some examples that I found over the forum, but, as I suposed, I can´t run my daqcard counters on the correct way to make spi protocol works properlly.

 

I know and I have read that software digital timing cards can not run SPI protocols, I have read it in the forum too, so my question is, how can I implement some kind of SPI protocol over this car?

 

Thank you very much.

0 Kudos
Message 1 of 6
(3,592 Views)

Djimenez,

 

Thanks for posting on the NI Forums. The 6062E card does not support correlated Digital I/O or using the counters as a timebase for your digital signals. In fact the Digital I/O ports on the 6062E are only software timed. At what rate is the SPI protocol that you are working with? 

 

Also, are you trying to only generate SPI signals or do you need to also read them back on the same lines?  The SPI digital waveform library was designed with some of the higher end HSDIO devices in mind, but depending on exactly what you are trying to implement with your SPI protocol there may be other options. 

 

National Instruments also makes an I2C / SPI module that is designed for SPI communication and is in a USB form factor. NI USB-8451. This may be another option if the 6062E won't work for your application. 

Aaron W.
National Instruments
CLA, CTA and CPI
Message 2 of 6
(3,587 Views)

Thank you very much for your fast reply,

 

I knew that my card was too limited for this kind of applications.

 

Actually I'll need at least a 16bits 32kHz SPI squared protocol, I mean, a SPI clk signal of 1MHz each 1/32000 seconds. This signal is a 16 us clk and data cycles and 16 us of idle sate.

 

I think that's imposible to reach with my actual card, but in order of improve my hardware I have to be able to make the application work. At this moment I'm not worried about data rate, but I have to make it work with all the specifications, I'm going to explain what I exactly need to d, right?

 

I need to simulate a mixed signal devide. It has 3 output signals.

 

1) TTL signal  from 0 - 20kHz

2) Analog signal from -5V/+5V amplitude and 0 - 20 Hz of frecuency rates. (Sinusoidal)

3) SPI signal only outpu, I don't need input signal. Device is master SPI with no control lines.

 

Analog and SPI signal must be realted to the same patron signal.

 

Well, I think I have written enought I don't want to bore you 🙂

 

I hope you can help me, and thank you again.


0 Kudos
Message 3 of 6
(3,578 Views)

Djimenez,

 

You are correct that your current 6062E will not be able to generate Digital samples that those rates, you would be limited to software time control of your digital lines and you would not be able to achieve those rates. 

 

You might look at some of the new National Instruments X-Series cards. They come in a PCIe form factor and have 8 hardware timed digital lines that are capable of doing up to 1 MHz. They have four 32-bit counters that will allow you to produce a TTL Square wave for item 1 that you mentioned below. Also, included are two analog outputs that will allow you to satisfy your analog sine wave you need to generate. 

 

I would look into the NI PCIe-6321. Let me know if you have any follow up questions. 

 

Overall, how much SPI data are you going to be generating? Do you just need to send out a specific digital pattern for a short amount of time with the analog output sine-wave and the TTL signal? 

 

I also wanted to point out a Developer Zone that we have on Serial Protocol Communictions with our Devices, if you have not found it yet. 

 

Serial Protocol Communication Reference Design for Digital Waveform Devices

Message Edited by Aaron W. on 04-12-2010 11:35 AM
Aaron W.
National Instruments
CLA, CTA and CPI
Message 4 of 6
(3,574 Views)

The problem is that I need a portable system so I would need to keep the pcmcia form factor, is there any daqcard that could reach my needs? Or if I have no pcmcia option, what was the most portable system I could have?

 

"Overall, how much SPI data are you going to be generating? Do you just need to send out a specific digital pattern for a short amount of time with the analog output sine-wave and the TTL signal?  "

 

Well, I will need to control timings, I need to use the application like it was a real device, but no more than 1 - 2 minutes are enought at this moment.

 

 

 "I also wanted to point out a Developer Zone that we have on Serial Protocol Communictions with our Devices, if you have not found it yet. 

 

Serial Protocol Communication Reference Design for Digital Waveform Devices"

 

 

I have seen it and I have tried to make it work, but I can´t. I get errors on clock timings. I'm going to try it again, and post my results.

 

Thank you.

0 Kudos
Message 5 of 6
(3,568 Views)

Djimenez,

 

If you need to stay in a portable solution, we have our USB M-Series devices that would allow you to connect to a laptop as well. If you  need 16 channels of DIO for the SPI communications you would need something similar to the USB-6229. This device would allow you to generate the necessary signals that you need. We have two options of USB-6229s, a BNC connector version and then a screw terminal version. I have attached links below. We don't have any PCMCIA devices that would perform the tasks that you need, so my best suggestion is USB. 

 

NI USB-6229

 

 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 6 of 6
(3,566 Views)