How do i receive a digital mems mic sensivity using ADAU17611761?
hello!
I would like to measure the data of a PDM digital microphone(SPH0641LM4H-1) with the structure below.
digital microphone <=> ADAU1761 <=> Osiloscope
-. digital microphone connected to ADAU1761 via PDM interface. MIC CLK, DATA, VDD, GND
(BCLK = MIC CLK, DATA = MIC IN, VDD = MICBIAS)
-. I check the I2S data through DAC_SDATA of ADAU1761.
Question?
Why isn't PCM data output from the DAC_SDATA pin?
Please Help me!!
I set the register of ADAU1761 as below, to get the data of the microphone.
=============================================================
//1. R0 => Disable Core Clock
wbuf[0] = 0x0E;
adau1761_i2c_write(0x4000, wbuf, 1);
//2. R1 -> PLL Control
wbuf[0] = 0x00; //M[15:8]
wbuf[1] = 0x00; //M[7:0]
wbuf[2] = 0x00; //N[15:8]
wbuf[3] = 0x00; //N[7:0]
wbuf[4] = 0x20; //R=4, X=1
wbuf[5] = 0x01; //PLL Enable
adau1761_i2c_write(0x4002, wbuf, 6);
//3. Poll PLL Lock bit
do {
adau1761_i2c_read(0x4002, rbuf, 6);
for(int i = 0; i<6; i++) {
printf("0x%x,", rbuf[i]);
}
printf("\r\n");
} while((rbuf[5] & 0x02) == 0x00); //while unlocked.
//4. R0 => Enable Core Clock, CLKSRC = PLL, INFREQ = 1024fs,
wbuf[0] = 0x0F;
adau1761_i2c_write(0x4000, wbuf, 1);
wbuf[0] = 0x01;
if(adau1761_i2c_write(0x4000, wbuf, 1) != 3) {
printf("IIC Error1");
}
//Verify data
adau1761_i2c_read(0x4000, rbuf, 1);
printf("0x4000 : 0x%x\r\n", rbuf[0]);
//R2 Digital MIC input
wbuf[0] = 0x20;
if(adau1761_i2c_write(0x4008, wbuf, 1) != 3) {
printf("IIC Error2");
}
//Verify data
adau1761_i2c_read(0x4008, rbuf, 1);
printf("0x4008 : 0x%x\r\n", rbuf[0]);
//R15 Serial port master mode
wbuf[0] = 0x01;
if(adau1761_i2c_write(0x4015, wbuf, 1) != 3) {
printf("IIC Error3");
}
//Verify data
adau1761_i2c_read(0x4015, rbuf, 1);
printf("0x4015 : 0x%x\r\n", rbuf[0]);
//R19 Digital Mic input enable, ADCs off
wbuf[0] = 0x14;
if(adau1761_i2c_write(0x4019, wbuf, 1) != 3) {
printf("IIC Error4");
}
//Verify data
adau1761_i2c_read(0x4019, rbuf, 1);
printf("0x4019 : 0x%x\r\n", rbuf[0]);
//R39 LRCLK BCLK pull up
wbuf[0] = 0x00;
if(adau1761_i2c_write(0x402D, wbuf, 1) != 3) {
printf("IIC Error5");
}
//Verify data
adau1761_i2c_read(0x402D, rbuf, 1);
printf("0x402D : 0x%x\r\n", rbuf[0]);
//R66 Digital clock gerator 1 on
wbuf[0] = 0x02;
if(adau1761_i2c_write(0x40FA, wbuf, 1) != 3) {
printf("IIC Error5");
}
//Verify data
adau1761_i2c_read(0x40FA, rbuf, 1);
printf("0x40FA : 0x%x\r\n", rbuf[0]);
/*
* 여기부터는 내가 추가
* */
wbuf[0] = 0x01; //8khz
//wbuf[0] = 0x02; //12khz
adau1761_i2c_write(0x40F8, wbuf, 1); //1-bit delay
//5. Mic Bias => Enable the MICBIAS output
wbuf[0] = 0x01; //0.9 * AVDD
adau1761_i2c_write(0x4010, wbuf, 1);
//3. R62 => DSP Run
wbuf[0] = 0x01;
adau1761_i2c_write(0x40F5, wbuf, 1); //DSP EN
adau1761_i2c_write(0x40F6, wbuf, 1); //DSP RUN
=====================================================================================================
=> this picture is digital microphone PDM output (Yellow = BCLK, Blue = Mic data output)
=> yellow = bclk, blue => DAC_SDATA
=> Why isn't I2S data output from the DAC_SDATA pin? Despite the PDM data entering MIC_IN.
Audio Signal Processors
SigmaDSP Audio Processors
adau1761
Please log in to reply.