I2C documentation error

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

I2C documentation error

Post by pythoncoder » Tue Sep 15, 2015 10:31 am

The docs for the I2C class constructor have the following error:
I2C(1) is on the X position: (SCL, SDA) = (X9, X10) = (PB6, PB7)
I2C(2) is on the Y position: (SCL, SDA) = (Y9, Y10) = (PB10, PB11)
X and Y should be transposed: pins (X9, X10) are on the Y position and (Y9, Y10) are on X.
Peter Hinch
Index to my micropython libraries.

blmorris
Posts: 348
Joined: Fri May 02, 2014 3:43 pm
Location: Massachusetts, USA

Re: I2C documentation error

Post by blmorris » Tue Sep 15, 2015 2:46 pm

I'm not seeing the error - for I2C(1), B6 is X9, B7 is X10, both on the X position; for I2C(2), B10 is Y9, B11 is Y10, both on the Y position.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: I2C documentation error

Post by pythoncoder » Tue Sep 15, 2015 4:50 pm

Look at the quick reference http://docs.micropython.org/en/latest/p ... ckref.html: we're agreed that for I2C(1), B6 is X9, B7 is X10 but on the diagram they are labelled "Y skin".

The pyb documentation is entirely consistent relating channels to pins, it's just the skin names that are incorrect. I only spotted this after I'd laid out a PCB using the quick reference and discovered that my I2C chips only worked if I initialised them with the skin name which did not correspond to the one to which they are physically connected.

The SPI docs are correct in this regard.
Peter Hinch
Index to my micropython libraries.

blmorris
Posts: 348
Joined: Fri May 02, 2014 3:43 pm
Location: Massachusetts, USA

Re: I2C documentation error

Post by blmorris » Tue Sep 15, 2015 6:50 pm

Are you referring to the quick ref chart here?

It looks correct to me, but "Y skin" refers to the top half of the board, with the pale green background, and "X skin" refers to the bottom half with the pale blue background. The two halves are laid out so that a board can see (nearly) the same pinouts on the 16 pins in the two outer columns in either position by rotating the board by 180 degrees. The names don't refer to the left and right columns. If the boards don't overlap, then you should be able to fit two skins on a pyboard, again rotated 180 degrees to each other.

Unless you are seeing something else that I'm still missing, which I won't rule out yet ;)

-Bryan

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: I2C documentation error

Post by pythoncoder » Tue Sep 15, 2015 7:38 pm

OK, I stand corrected. I'd always taken it that X and Y referred to the sides of the board rather than the top and bottom halves. The otherwise excellent quick reference chart is confusing in this respect: I'd never noticed the subtle colour difference between top and bottom. The fact that the Y-skin and X-skin labels are on opposite sides draws attention to the left-right symmetry rather than that between top and bottom.

Well, that's my excuse ;)
Peter Hinch
Index to my micropython libraries.

Post Reply