LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-8452 SPI scripting write read with HCM6300/HCM6301 - no data read, scope shows otherwise

Hi, 

So I've managed to get a USB-8452 and was able to match the timing diagram given by the datasheet 
HCM6300/HCM6301 SPI timing DiagramHCM6300/HCM6301 SPI timing Diagram

However as I was the VI, I always get a read data value of 0 even though when viewed under a scope, I could see some data on the 8452's MISO line.  

LEGEND:
Blue - Chip Select
Red - Clock

Green - MOSI USB-8452
Yellow - MISO USB-8452

This is the waveform when writing data, here I am writing 0x34 to address/row 0x00 with device address 0x07, LSB first

Writing data 0x34 to Row 0 at Device Address 0x07Writing data 0x34 to Row 0 at Device Address 0x07

 

 

 

Here, I am reading back the data from the said address/row 0x00 with device address 0x07, LSB first

And I'm expecting to receive 0x34 (0x2C when LSB first)

 

Reading back data 0x34 to Row 0 at Device Address 0x07Reading back data 0x34 to Row 0 at Device Address 0x07Read Data from the last write read VI - 0, but waveform shows otherwiseRead Data from the last write read VI - 0, but waveform shows otherwise


Would this be something related to the driver? Or is there something I'm missing?

 

 

0 Kudos
Message 1 of 2
(893 Views)

What is the purpose of this piece of code? I could not match these 4 bits to anything.

santo_13_0-1629757792776.png

 

Any reason you want to go with script mode and not normal mode?

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 2
(864 Views)