Hello everyone!
So i have a board that has two 12-bit DAC's (LTC1257) . They are cascaded together with the Dout of one DAC going into the Din of the other. So essentially I need to shift in 24 bits to get my two 12-bit analog output voltages. I have tried using the SPI write script API with some success but there are times where my output voltages make no sense and i think it's because the timing is not always right. Therefore, i want to try some good old fashioned bit-banging on the DIO lines of the NI-8451 and see if that works. The timing requirements for the DAC are attached, which I am trying to mimic with 3 DIO lines. One for the clock, one for the data in to the DAC and one for the LOAD line. However, I am having trouble synchronizing all the signals to get the timing just right. I don't know if i'm limited because of the hardware or if i'm just not doing it the right way.
Attached is my code (LV 2011) and also an jpeg image of my code. I have tried multiple ways but the best I have so far is running 2 loops simultaneously, one loop for the data and clock and the other for firing off my load line (which is not a very accurate way). If I run one signal at a time and check my scope, the signal looks ok, but when i try running 2 or 3 signals at a time, the timing of the signals get all funky on scope, which makes me think it might my hardware that can't keep up. Any advice on how I should approach this would be greatly appreciated!
thanks,
Serge