LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What determines how many bytes a 8451 reads during a SPI transaction?

Hello,
 
  What determines how many bytes a 8451 reads during a SPI transaction? Depending upon the device that you are interfacing with the quantity of bytes that comes back varies.
 
Regards,
 
  Kaspar
Regards,


Kaspar
0 Kudos
Message 1 of 3
(2,299 Views)

Hello,

   I have oberserved that the NI-8451 returns a byte during a read for each byte that was written, So if you write 5 bytes, you will get 5 bytes back. If you write one byte, then you will get 1 byte back. However, I have looked at the SPI clock with a scope and have noticed on 8 clock cycles for a btye arite, followed by a 1 byte read, so should there be 16 clocks?

 

Regards,

 

 Kaspar

 

Regards,


Kaspar
0 Kudos
Message 2 of 3
(2,290 Views)

Hi Kaspar,

What you described regarding the reading and writing of data from an SPI device looked correct - I posted a similar response on your other thread here.  Also, you are correct that each bit of SPI data will be transferred per clock cycle.  So, if you were to write a byte of data and then read a byte of data, you would expect to have 8 clock cycles per byte.  Hope this helps!


Regards,
Anna M.
National Instruments
0 Kudos
Message 3 of 3
(2,277 Views)