Community
cancel
Showing results for 
Search instead for 
Did you mean: 
VVorn
New Contributor II
2,103 Views

i2c-1: Are 0x20, 0x21, 0x22, 0x23 reserved addresses?

Jump to solution

I am currently trying to get access to a MCP23017. I grounded A0,A1,A2 of the MCP23017, therefore the address should be 0x20 according to the data sheet. When running the intel edison on the big arduino breakout board WITHOUT the MCP23017 I get the following output:

When using the intel edison with my own hardware and the MCP23017 connected, I get the following output:

It seems that the MCP23017 is being detected, however I can not access it (UU). What's blocking me from accessing the MCP23017?

1 Solution
BBeza
New Contributor I
287 Views

On the Arduino breakout board, there are four PCAL95x5-family GPIO expanders on I2C-1, configured on addresses 0x20, 0x21, 0x22, and 0x23. They're used for controlling I/O pin level shifters, pull-up resistors, and analog muxing. The kernel is configured to load the pca953x driver and point it at those addresses. I don't know for certain that that would block other things from using those addresses when not attached to the Arduino board, but it's worth a try to just set your MCP23017's address to something above 0x23.

Alternatively, check if the PCAL9535A or PCAL9555 would work for your application and imitate the Arduino board's configuration. The kernel already knows how to make those appear as /sys/class/gpio/gpio200 to gpio263. You can see how they're set up here: http://www.intel.com/support/edison/sb/CS-035272.htm Intel® Edison Boards — Arduino* Board Schematic

View solution in original post

4 Replies
Pedro_M_Intel
Employee
287 Views

Hello IntelAnonymous,

First of all I would ask you if you have enabled I2C on your board first. If you haven't, you can do it with the instructions found on section 11.6 of the http://www.intel.com/support/edison/sb/CS-035252.htm Intel® Edison Boards — Intel® Edison Breakout Board Hardware Guide. If you haven't it is very likely that this is the reason why your board doesn't recognize your sensor.

If you have already enabled I2C on your board, then your sensor might not be being recognized since the board should show the sensor's address on a hexadecimal number. In this case, I would test with another I2C sensor to check if the original is not working correctly. It could also be that you are not using the correct voltage reference for your sensor. What's the operational voltage of your sensor?

Peter.

VVorn
New Contributor II
287 Views

I can not find section 11.6 in this document? The "Compute Module Hardware Guide" also has no such section?

// Edit:

I think this document is the right one: http://www.intel.com/support/edison/sb/CS-035275.htm Intel® Edison Boards — Intel® Edison Kit for Arduino* Hardware Guide

However, section 11.6 refers to I2C_6. I am using I2C_1. Isn't I2C_1 already configured?

BBeza
New Contributor I
288 Views

On the Arduino breakout board, there are four PCAL95x5-family GPIO expanders on I2C-1, configured on addresses 0x20, 0x21, 0x22, and 0x23. They're used for controlling I/O pin level shifters, pull-up resistors, and analog muxing. The kernel is configured to load the pca953x driver and point it at those addresses. I don't know for certain that that would block other things from using those addresses when not attached to the Arduino board, but it's worth a try to just set your MCP23017's address to something above 0x23.

Alternatively, check if the PCAL9535A or PCAL9555 would work for your application and imitate the Arduino board's configuration. The kernel already knows how to make those appear as /sys/class/gpio/gpio200 to gpio263. You can see how they're set up here: http://www.intel.com/support/edison/sb/CS-035272.htm Intel® Edison Boards — Arduino* Board Schematic

View solution in original post

VVorn
New Contributor II
287 Views

After removing the driver support for the PCA9535 when building my yocto image address 0x20 was not longer blocked! Thank you, Bunsen! Of course, another option is to simply chose another address because 0x20-0x23 are indeed "blocked".

Reply