using Multichannel Audio platform as I2C Slave Topic is solved

New to XMOS and XCore? Get started here.
Mike Cole
Member
Posts: 11
Joined: Tue Oct 03, 2017 1:30 am

using Multichannel Audio platform as I2C Slave

Post 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?


View Solution
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post 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)
User avatar
CousinItt
Respected Member
Posts: 360
Joined: Wed May 31, 2017 6:55 pm

Post by CousinItt »

The I2C library user guide (4.0.0) also says that slaves have to use two one-bit ports.
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post 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.
Mike Cole
Member
Posts: 11
Joined: Tue Oct 03, 2017 1:30 am

Post 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?
Mike Cole
Member
Posts: 11
Joined: Tue Oct 03, 2017 1:30 am

Post 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?
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post 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.
Mike Cole
Member
Posts: 11
Joined: Tue Oct 03, 2017 1:30 am

Post 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
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post 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)
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

The board wasn't really made for general purpose use - more of a reference design. Hence the lack of easily usable GPIO.
Post Reply