Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Potentiometer AD 7376 using USB 6289

Hi,

I'm using Labview 2012 for controlling the digital potentiometer (AD7376) in variable resistor mode. Screen Shot 2013-01-09 at 10.39.37 PM.png

What has to be done :

1) Clock source is conncted externally using PFI12/ counter output terminal. 

2)The trigger (manual) is connected to Port1.0 as an external inverted trigger (CS_inverted) to start the clock pulse.

3)7-bit Data is written through port0.0 serially at rising edge of the clock. Once the clock cycle completes 7 cycles, the trigger is set to high manually so that data is latched. This is manually done bacuase I have connected the 3 inputs to LEDs and I know when it completes 7 clock cycles and stop the trigger.

 

Help needed:

1) To automatically stop the trigger (set CS_inverted to high) after it completes 7 clock cycles. 

2) To view the timing diagram in the same graph.

 Timing diagram.png

 

 

code.PNG

0 Kudos
Message 1 of 5
(7,756 Views)

@Easwar wrote:

Hi,

I'm using Labview 2012 for controlling the digital potentiometer (AD7376) in variable resistor mode. Screen Shot 2013-01-09 at 10.39.37 PM.png

What has to be done :

1) Clock source is conncted externally using PFI12/ counter output terminal. 

2)The trigger (manual) is connected to Port1.0 as an external inverted trigger (CS_inverted) to start the clock pulse.

3)7-bit Data is written through port0.0 serially at rising edge of the clock. Once the clock cycle completes 7 cycles, the trigger is set to high manually so that data is latched. This is manually done bacuase I have connected the 3 inputs to LEDs and I know when it completes 7 clock cycles and stop the trigger.

 

Help needed:

1) To automatically stop the trigger (set CS_inverted to high) after it completes 7 clock cycles. 

2) To view the timing diagram in the same graph.

 Timing diagram.png

 

 

code.PNG


according to your timming graph...you need to send out 3 signals all at once,"one channel for all lines." take a look at the NI example: \examples\DAQmx\Digital Output\Digital (Pipelined Sample Clock) - Continuous Output.vi

 

 

Spoiler
Simple Digital Waveform DT Graph_FP.png

 

0 Kudos
Message 2 of 5
(7,683 Views)

you should also check out this discussion on SPI communication with useful links......

0 Kudos
Message 3 of 5
(7,663 Views)

Thanks a lot apok !. I will get back to you if I have any questions.

0 Kudos
Message 4 of 5
(7,653 Views)

I was able to control a dig pot using Arduino UNO  and labview drivers in this discussion, plus at a percent of the cost of a M Daq...

"SPI using digi pot MCP41xxx/42xxx"

0 Kudos
Message 5 of 5
(7,646 Views)