I'm currently trying to modify the 'General SPI Read.vi' to work with the MS5803-01 pressure sensor (datasheet attached), with no luck so far. The steps I took to modify it and the results are listed below. I have extremely limited Labview knowledge, so I really appreciate having even the simplest errors pointed out to me. Thanks in advance for any assistance!
Changes made to the code:
-Upon opening the example, the input to the 'close reference.vi' is incorrectly wired, so i connect that to the device reference
-Set the device (NI USB 8452) and Chip Select (4) on the front panel
-Set the number of bytes to read to 3 (24 bit result from the ADC)
-Add a control ('WRITE') to allow changing of the written bytes
Things I know:
The sensor needs to be sent '1E' to reset first
Next, 'A0 - AE' in order to read the calibration coefficients (should receive a 16 bit result each time)
Next, '48' or '58' in order to trigger the conversion of the two data points
Lastly, '00' to read the ADC and return a 24 bit result for the data point
Things I don't know:
The EEPROM Data address (and address width), I can't find any mention in the datasheet of the address I should be sending my command bytes to.
Current Result when Run:
Error -301735
- NI-845x: The number of bits provided is invalid. Refer to your documentation to determine valid values.
I can't find any further info on this error, but my assumption was that the labview code was receiving a different number of bits from the 8542 than it was expecting. I thought this would be to do with the 'Number of Bytes to Read' setting, but I tried a variety of options without any luck.
Current hardware setup:
An MS5803-01 pressure sensor, connected to an NI-8452 using the MISO, MOSI, SCLK and CS(4) connectors. Wired as prescribed in the datasheet. It is connected to a 3.3V power source with a 100nF capacitor between Vdd and ground. The PS pin is pulled to ground as well.
As I mentioned before, my labview and digital signal knowledge is very limited. I've done extensive searching online to try find a guide that could help me get this set-up, and I've tried a variety of examples and guides, but I haven't found anything that helped. I decided to post this using the official labview example, since it seems like it should be the simplest to modify. Once again appreciate any assistance. Cheers! Bruce