Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a 12-bit digital input using LabVIEW

Solved!
Go to solution

I am wondering how to read 12-bit digital input using a USB-6008 DAQ and LabVIEW. I want to connect the MAX6675 thermocouple amplifier (https://www.maximintegrated.com/en/products/sensors/MAX6675.html) to the USB-6008. The MAX6675 outputs the temperature as 12-bit digital data that is read-only and SPI compatible. The data is outputed on the MAX6675 serial data output pin.

This is from the data sheet for MAX6675 (https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf😞

"The Typical Application Circuit shows the MAX6675 interfaced with a microcontroller. In this example, the MAX6675 processes the reading from the thermocouple and transmits the data through a serial interface. Force CS low and apply a clock signal at SCK to read the results at SO. Forcing CS low immediately stops any conversion process. Initiate a new conversion process by forcing CS high. Force CS low to output the first bit on the SO pin. A complete serial interface read requires 16 clock cycles. Read the 16 output bits on the falling edge of the clock. The first bit, D15, is a dummy sign bit and is always zero. Bits D14–D3 contain the converted temperature in the order of MSB to LSB. Bit D2 is normally low and goes high when the thermocouple input is open. D1 is low to provide a device ID for the MAX6675 and bit D0 is three-state."

CS is a pin on the MAX6675, and CS stands for Chip Select. SO is the serial output pin. SCK is the serial clock input.

 

Using LabVIEW, how can I create a serial clock input? How can I read the 12-bit digital input using LabVIEW? What is conversion in this context? What does it mean for a bit to be three-state? How can I create a LabVIEW program that correctly reads the digital input?

 

Thank you! I am a newbie in LabVIEW

0 Kudos
Message 1 of 2
(2,643 Views)
Solution
Accepted by topic author shaferemma

Not going to work with a USB-6008.  What you really need is something like a USB-8452, which is specifically made to handle I2C and/or SPI interfaces.  It has a simple API, so all you have to do it wire it up and perform a read to get your data.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(2,614 Views)