Hello:
I would like to interface labview with a serial Digital to analog
converter (DAC). The converter is an intergated circuit TLC5620CN.The
digital code for the DAC is obteined from the output of a PID controller,
also programmed in Labview. The DAC's inputs are three digital signals: one
for the data and two for control(clock and "load data").
I'm using Labview 5.1. It's runing on a windows 95 AMD k6 PC. I
don't have any special hardware. I have a digital I/O board in a EISA Slot.
I can obtain an output bit using the outport.vi function. So I could
write 8 bits at the same time, three of them would be the three inputs to
the DAC. I can't use RS232 because it is used for something else
So here is what I thought:
1) I have a PID output, wich is an integer variable
2) I have to obtain the binary representation of the PID output.
This representation should be 8 bits long.
3) I have to write this representation bit by bit in a serial way
to the DAC. (And the control signals too)
¿Is the general scheme possible to program? I think I can achieve step 2)
with the "number to boolean array" function. But how can I achieve step 3)?
If I have a booelan array, how can I send each of its bits, one by one in a
controlled way, to the outport.vi? I have seen some data manipulation
functions like "swap bytes", "shift with carry", but they operate with
integers, they don't shift a boolean array.
May be there is another way to accomplish this and I don't see it.
Could someone help me, please? (alway using the hardware I have)
Thank you very much,
fgf