Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

I2S decoding using NI myRIO

Dear all,

 

I need to decode data from Digital MEMS microphone (ICS-43432) using NI myRIO 1900.

I have attached below the screenshot of thte sytem block diagram of microphone.

System Block Diagram.JPG

 

In my circuit, I am using only one MEMS circuit and I have connected the

  • LR to 0 (GND)
  • WS to Connector A: Digital Input 0
  • SCK to Connector A: Digital Input 1
  • SD to Connector A: Digital Input 2

I was told that I can use FPGA in myRIO to establish I2S communication and tranfer the data from FPGA to RT Host using DMA FIFO

 

I have manage to find "LabVIEW FPGA I2S decoder" from the link below

https://decibel.ni.com/content/docs/DOC-1230

 

When i tried to run this program in myRIO, i am neither getting any significant output nor I understand how the program works.

I suspect the program is running too fast when i obseved the iteration counter both in FPGA and in RT.

I am wondering how do i configure the loop speed to that of my preferred sampling rate.

 

I need to perform sampling, fs at a rate of 48 KHz

From the data sheet of the microphone, i realised that 

SCK = 64 x fs = 64 x 48 KHz = 3.072 MHz

It's also mentioned that it produes 24 bit data

 

Can anyone help me explain or understand how this I2C program shown below works.

If not, can you provide me with some reference links.

 

Thanks in advance Smiley Happy

 

FPGA screenshot

 

FPGA screenshot.JPG

 

Real Time Target Screenshot

 

RT screenshot.JPG

 

Download All
0 Kudos
Message 1 of 2
(4,833 Views)

To change the timing of your acquisition you just need to double slick the blue wings on the timed loop structure, by default it's going to be 40MHz. 

 

For this VI, the most important thing to understand is how we clock digital inputs on the FPGA. Again, the logic is running at 40MHz by default so we detect clock edges by just comparing the current digital input values to what they were in the previous iteration. If the values are the same then nothing of interest has happened. If the values are different then we just detected an edge. More specifically, if the value was low and is not high there was a rising edge and if the value was previously high but is not low we have a falling edge

 

There is a lot to go over, so is there anything specifically that you are having trouble understanding?

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 2
(4,794 Views)