Hi everyone,
I have the XK-EVK-XU316 and I would like to add 6 input i2s MEMS microphones to the existing 2-channel i2s ADC/DAC codec included in the board. I was thinking I could use the same SLCK and LRCK pins that are driving the included CODEC. Basically 2 analog audio inputs and 6 digital MEMS over USB. My guess is that I would need to assign 3 more 1-bit pins as inputs but I haven't managed to figure out how.
I've successfully compiled and flashed 2AMi2o2xxxxxx from app_usb_aud_xk_316_mc_extrai2s into the board. I've tried modifying it in various ways but it never fully compiles. Probably because I don't fully know what I am doing. I have some understanding of coding and hardware but new to the XMOS world.
Is this something that would be possible with this board and if so how should I approach this? Any advice would be very much welcome.
Thank you!
Adding i2s microphones Topic is solved
-
- New User
- Posts: 2
- Joined: Sat Jun 22, 2024 6:20 pm
-
Verified
- XCore Legend
- Posts: 1070
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Should be straight forwards enough.
Rough instructions to add a few mics as I’m away from my work machine. Need to also check how many 1bit ports are spare on the i2s tile. I think only 3 that can be repurposed.
- Add N more ADC data ports to the xn file
- change NUM_USB_CHAN_IN from 2 to N
- change I2S_CHANS_ADC from 2 to N
For 6 mics you’ll run out of ports on the tile 1 and things will get a bit more complicated.
Rough instructions to add a few mics as I’m away from my work machine. Need to also check how many 1bit ports are spare on the i2s tile. I think only 3 that can be repurposed.
- Add N more ADC data ports to the xn file
- change NUM_USB_CHAN_IN from 2 to N
- change I2S_CHANS_ADC from 2 to N
For 6 mics you’ll run out of ports on the tile 1 and things will get a bit more complicated.
Technical Director @ XMOS. Opinions expressed are my own
-
- New User
- Posts: 2
- Joined: Sat Jun 22, 2024 6:20 pm
Hi Ross,
Thanks for the reply. Yes there's pins 36, 38 and 39 that are 1-bit. I did what you suggested. Added ADC data ports in the .xn file, changed NUM_USB_CHAN_IN and I2S_CHANS_ADC. I just first tried adding 2 more channels. But when compiling extra_i2s.xc I get the error:
xmap: Error: Symbol p_i2s_adc[0] is a duplicate port declaration.
xmap: Error: previously declared as p_i2s_adc[1].
I guess there is some conflicts with extra_i2s.xc ? Any ideas where else to check.
Thank you!
Thanks for the reply. Yes there's pins 36, 38 and 39 that are 1-bit. I did what you suggested. Added ADC data ports in the .xn file, changed NUM_USB_CHAN_IN and I2S_CHANS_ADC. I just first tried adding 2 more channels. But when compiling extra_i2s.xc I get the error:
xmap: Error: Symbol p_i2s_adc[0] is a duplicate port declaration.
xmap: Error: previously declared as p_i2s_adc[1].
I guess there is some conflicts with extra_i2s.xc ? Any ideas where else to check.
Thank you!
Last edited by RaiGon84 on Mon Jul 29, 2024 2:17 pm, edited 1 time in total.
-
Verified
- XCore Legend
- Posts: 1070
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Can you share what you added to the XN file?
I guess you added the same port twice.
I guess you added the same port twice.
Technical Director @ XMOS. Opinions expressed are my own
-
- New User
- Posts: 2
- Joined: Sat Jun 22, 2024 6:20 pm
Hi Ross,
You were right, I doubled the port. Made the changes and now it works like a charm.
Thank you!
You were right, I doubled the port. Made the changes and now it works like a charm.
Thank you!