I2C on Audio Slice - Electrically Problematic?

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
Treczoks
Active Member
Posts: 38
Joined: Thu Mar 21, 2013 11:18 am

I2C on Audio Slice - Electrically Problematic?

Post by Treczoks »

Hi!

I'm working on the next step of my project where I need to talk to the audio slices' I2C bus.

I was a bit shocked when I saw that SDA and SCL is not implemented as two one-bit-ports, but two pins of a four-bit-port. While the developers of the i2c-sp.xc driver use a neat trick to reduce the impact of colliding output ports, the hardware down not even provide a resistor in the data line to help in this situation.

So when I've read a ONE bit, and the next bit from the slave is a ZERO, two driven outputs are colliding directly for about a quarter of a clock cycle. This is not just "not cool", this is BAD.

Why did you (XMOS) put these signals on one 4-bit-port instead of two 1-bit-ports? B13 (P1N0) and B17 (P1O0) are NC, so it was not caused by a lack of ports.

Astonished,
Christian Treczoks


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

Post by Ross »

I believe due to lack of 1 bit boards when plugged into a slot of the U8 "core" board.

Agree they should be two separate ports (not necessarily 1-bit) if possible.
User avatar
Berni
Respected Member
Posts: 363
Joined: Thu Dec 10, 2009 10:17 pm

Post by Berni »

Well i often saw them run out of 1bit ports on boards so they had to put I2C on to something else. I usually saw it used for configuring audio codec chips and such where you only need to write data to it, never read, in that case it works pretty fine.

Oh and don't worry if there is a tiny bit of logic contention, it never damages chips, especially with the quite wimpy 4mA output drivers on xmos chips. Still i think they should have a proper 1bit port I2C library as well.
User avatar
Ross
XCore Expert
Posts: 968
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Berni wrote:Well i often saw them run out of 1bit ports on boards so they had to put I2C on to something else. I usually saw it used for configuring audio codec chips and such where you only need to write data to it, never read, in that case it works pretty fine.
Yep, write only is fine.
Berni wrote: Oh and don't worry if there is a tiny bit of logic contention, it never damages chips, especially with the quite wimpy 4mA output drivers on xmos chips. Still i think they should have a proper 1bit port I2C library as well.
There is are I2C codebases for shared and separate ports. There are some lightweight versions too.
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

The lack of 1 bit ports is one of my most common issues in design it can be very frustrating and resorting to mangling other ports often makes the code more hairy as well as wasting pins. I have often thought that all ports should by default be 1 bit ports with other port widths and alternate functions (e.g. links/jtag) muxed on top. This would not only help eradicate the shortage of 1 bit ports but would also make the port side of the Xmos platform much easier to learn for newcomers. I would also like ports to be able to be grouped into any arbitrary dimension rather than just the 1,4,8,16 and 32.

Maybe a feature for any new silicon?

regards
Al
Treczoks
Active Member
Posts: 38
Joined: Thu Mar 21, 2013 11:18 am

Post by Treczoks »

Folknology wrote:The lack of 1 bit ports is one of my most common issues in design it can be very frustrating and resorting to mangling other ports often makes the code more hairy as well as wasting pins. I have often thought that all ports should by default be 1 bit ports with other port widths and alternate functions (e.g. links/jtag) muxed on top.
Definitely.