Page 1 of 2

using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 1:35 am
by Mike Cole
Hi,

I would like to use the MAP as an i2c slave device, however in AN00157, it says " When the xCORE is acting as i2c slave the two lines must be connected to two 1-bit ports". According to the MAP hardware manual, i2c SCL and SDA are not mapped to one bit ports. Am I out of luck? Can I remap to one bit ports somehow?

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 11:13 am
by Ross
Which board are you Ising the xCORE-200 based one?

The info is probably out of date (and relates to the previous generation of devices)

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 12:18 pm
by CousinItt
The I2C library user guide (4.0.0) also says that slaves have to use two one-bit ports.

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 12:34 pm
by Ross
Sorry, should have read you post more carefully. Master can share a multi-bit port on xCORE-200, slave still needs two 1-bit ports.

You could wire it up to two un-used 1-bit ports, say if you are not using SPDIF or similar.

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 1:24 pm
by Mike Cole
Ross wrote: You could wire it up to two un-used 1-bit ports, say if you are not using SPDIF or similar.
So I don't have to use the port mappings for a given functionality as outlined in the hardware manual?

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 2:13 pm
by Mike Cole
For example, could I solder pin headers onto the xSDIO1 and xSDIO2 holes and use those ports to receive i2c communication? Or is it possible to remap in software and still use the SDA and SCL labeled connections on the board?

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 2:48 pm
by Ross
the hardware manual just documents what is wired up on that board- you can use a 1-bit port for what-ever you like (obviously checking that nothing on the board is driving against it). All of the ports are general purpose.

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 3:48 pm
by Mike Cole
That's great news! I have attached an image below. The SCL and SDA pin holes are circled in red while xSDIO1 and 2 are circled in blue. I have soldered pinheaders onto SCL and SDA in order to control the MCA from an external device. Just to confirm, will I be able to use the 1 bit ports which are normally used for xSDIO 1 and 2 to communicate through the physical SCL and SDA connections circled in red or do I need to solder pinheaders onto the xSDIO holes circled in blue?
Image

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 3:57 pm
by Ross
If memory serves me correctly those ones you have circled in blue are data-lines from the ADC - are you not using all 8 channels?

Also, the ADC will be driving against those pins, if you are not using the ADC at all you could hold the ADC in reset. If you are hoping to use the other 4 channels the schematics would need checking to see if J8 can be used to disconnect them from the xCORE - I cannot remember from the top of my head (Im assuming you don't want to to start cutting tracks on the board..!)

Looking at the board I think that O_tx and C_tx are your best options (assuming not using optical or co-ax transmit)

Re: using Multichannel Audio platform as I2C Slave

Posted: Tue Oct 03, 2017 3:58 pm
by Ross
The board wasn't really made for general purpose use - more of a reference design. Hence the lack of easily usable GPIO.