LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reducing a SPI read/write function to 5bits.

Solved!
Go to solution

Hello,

 

I have been given a project to develop a SPI interface with 7 bits of address with one bit to mode (R/W) but the test registers only being 5 bits wide.  Is there a way to get the subVI's for the USB-8451 SPI interface to limit the number of bits in the data stream?  Or can you release the chip select so that only 5 bits are sent.  If anyone has had some experience with this please let me know if this is possible.

 

 

Gary Tyrna

0 Kudos
Message 1 of 5
(3,260 Views)
There really is no formal standard for SPI, but SPI communication generally uses 8 bits of data. The 8451 is limited to dealing with this. Thus, you'd get 8 clocks. If your device would get messed up with 3 extra clocks then you could just do some old-fashioned bit-banging with the 8451.
Message 2 of 5
(3,249 Views)
Thank you for your response to my question.  Unfortunately I can't bit-bang this because of the operating speed of 50MHz.  I know that the USB-8451 will only fly as fast as 12MHz but this was going to be a proto code to see if we could do the 5bits.  Do you know if NI has a SPI interface in either in a POD or a PCI card that will allow me to control the number of clocks.  Also do you know if NI's FPGA functions would allow me to control the clock in this way. 
0 Kudos
Message 3 of 5
(3,245 Views)
Solution
Accepted by topic author ggaryt

ggaryt wrote:
Thank you for your response to my question.  Unfortunately I can't bit-bang this because of the operating speed of 50MHz. 

Well that's a wee bit of an important fact. Smiley Very Happy

 

NI only has 1 SPI device. I am not aware of third-party SPI devices that can operate at that speed, let alone control the number of clocks.

 

I'm not all that familiar with the FPGA, but the basic spec for the NI LabVIEW FPGA Module is a loop rate of 40 MHz. You may need to look into some of the high-speed digital devices that NI sells. My suggestion is to contact your local NI sales rep.

0 Kudos
Message 4 of 5
(3,234 Views)

Yea that is a bit of important infomation.

 

Talking this over with my boss we have come up with a possible solution by sending the data stream as 16 bits (wants 13) which will cause the interface to believe the address sequence is restarting but we have a way of reinitializing the input so it will sync back up.  He is also trying to get the customer to go to a more standard format I hope.

Thanks for you help.

 

Gary Tyrna

0 Kudos
Message 5 of 5
(3,221 Views)