From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-31-2007 01:57 AM
11-02-2007 03:27 AM
11-04-2007 08:25 AM
Hi Robert,
Ok, I understand that the USB-6009 is not the best hardware for this kind of application, but the fact is that this is the only device I have in the moment, and therefore I would like to ask you for some help in trying to find a way to use the USB-6009 with the SPI device anyway.
The main problem I have in the moment is to synchronize a reading loop with an external clock (which, in turn, controls the rate at which the SPI device sends its bits to one of the digital lines of the USB-6009). The USB-6009 does not support timing through "change detection", so it is not possible to input my external clock signal in another digital line and detect its rising and/or falling edges to control the sampling rate of a reading loop.
I do not have to much experience with Labview and also with this interface USB-6009, and therefore I cannot think in any other solution to this problem, given this resource limitation of the interface I am using. Is there any other way to synchronize the reading sampling rate with an external clock source using the USB-6009? Are there Example VIs that could be interesting for this case?
Thank you in advance for your answer.
Regards
Guilherme
11-05-2007 01:49 AM - edited 11-05-2007 01:50 AM
05-13-2015 02:53 AM
it's not possible to build clk signal by software? put clk at 1 and then at 0 with time wait sequence and while loop in labview???
05-13-2015 01:08 PM
It's not that it's "not possible to build clock signals", it's the accuracy of the signal you build.
The timing in a software-timed board is dependent on a lot of factors - what the op system's doing, USB traffic, if the DAQ's doing other I/O, etc.
If a couple ms jitter between bits is acceptable, then the 600x is fine (like toggling relays or flashing an LED for an operator). For SPI (or most other digital comms), that jitter is unacceptable and the system simply won't work.
600x's are great DAQs for the cost, but when you need performance, you need to look at other options.
05-13-2015 01:34 PM
01-04-2016 04:15 PM - edited 01-04-2016 04:17 PM
It seems worth noting that you can use the 6009 board for some SPI communication quite well. I had the same question as the OP, and I agree with other comments that one shortcoming of the 6009 is that you can't sync with an external clock, however you can bit bang SPI really easily, and as long as you don't need a fixed/stable clock speed, that will be just fine. I was able to program a digital potentiometer by using three digital I/O lines on a 6009, giving each one a button in labview, and manually entering each bit as per the device's spec. A few simple loops and logic would automate this and should give me a decent enough clock speed for what I want. Of course I won't be able to hit the 20MHz top clock speed the chip allows, but that's fine by me at this stage of the game and for using a USB controller that I have laying around.
I included my VI as an attachment, written in Labview2011.
My understanding is that you could also do this for I2C (though it will be more complicated) <Ref: http://electronics.stackexchange.com/questions/44670/what-is-bit-banging >
EDIT: In my code, the button "Data Byte" should be labeled "Data Bit", fyi.
05-18-2022 12:32 PM
Hello,
I am attempting to do something similar, trying to connect my USB-6009 to an Adafruit MAX31856 Thermocouple Amplifier to read a K-Type thermocouple. I am trying to code this in Python. I was wondering if A) you think this is possible through bit banging the SPI, and B) you had any ideas on how to format the loop to do so. Please let me know if I can provide more details.