LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing external ADC with myRIO

Hello. 
Im using LabVIEW 2013 with myRIO 1900 and am stuck from the past two months trying to interface an external ADC to myRIO since myRIO has run out of analog inputs. I have tried ADS8332 (SPI based) and ADC0808 (parallel output based with zero luck.

 

For ADC0808 I have attached an external clock of frequency approximately 1kHz made using 555 timer. Before this, I tried to make my own clock variable and toggle it up and down according to the timing diagram, but that didnt work. The Add A,B,C pins have been physically grounded to select AI0 channel. 

 

I am attaching my code and datasheet of ADC for reference. 

 

P.S any help will be greatly appreciated 

 

 

0 Kudos
Message 1 of 5
(3,610 Views)

Your code is missing.

0 Kudos
Message 2 of 5
(3,593 Views)

Oops. Sorry

Download All
0 Kudos
Message 3 of 5
(3,554 Views)

You should be able to get either the SPI or Parallel ADC working with the myRIO. 

 

SPI

- Are you using the myRIO SPI library? (Some devices use some slightly custom protocols, so that library might not be suitable)

- What do you see when you hook up a scope to the SPI Clock / Data channels? Does it match the datasheet?

 

Parallel

Again - what do you see when you hook up a scope/logic analyser to your data lines?

- You are trying to do all of your timing on the RT side of the myRIO - you would typically do this on the FPGA but it requires knowledge of FPGA programming etc.

- I don't understand why you are using an external timer...this makes it nearly impossible to accurately sync up your writing/reading of data to the clock pulses - especially when you have 1kHz (1ms) external clock and yet your code is only making changes every 5ms.

 

In short - use a scope to verify that what you are sending/receiving is as per the datasheet.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 5
(3,519 Views)

Hello. 

So I managed to get the parallel out ADC0808 ADC to work.. The SPI one ADS8332 is still giving me problems, I will attach my code in some time so you can maybe take a look at what I'm doing wrong.. 

 

Thanks 

0 Kudos
Message 5 of 5
(3,482 Views)