Site Tools


software:programming:i2c:shell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
software:programming:i2c:shell [2017/03/07 15:10] – [Using user space via i2c] adminsoftware:programming:i2c:shell [2017/03/07 22:18] (current) – [References] admin
Line 36: Line 36:
 # For example: for bit 0, write: # For example: for bit 0, write:
 i2cset -y 0 0x20 0x14 0x01 i2cset -y 0 0x20 0x14 0x01
 +</code>
 +
 +==== Hardware detection ====
 +Color table:
 +^ Bit ^ mcp23008 ^ mcp23017 ^
 +|  1  |  L_GRN     L-BLU  |
 +|  2  |  L_BLU     L-GRN  |
 +|  4  |  L_RED     L-RED  |
 +|  8  |  R_BLU     R-BLU  |
 +|  16 |  R_GRN     L-GRN  |
 +|  32 |  R_RED     L-RED  |
 +|  64 |  WHITE     WHITE  |
 +| 128 |  HEATR     HEATR  |
 +
 +<code bash>
 +# Detection for mcp23017:
 +i2cset -y 0 0x20 0x00 0x00
 +i2cset -y 0 0x20 0x14 0x01
 +i2cget -y 0 0x20 0x14
 +
 +# should give 0x01 on mcp23017 and 0x00 on mcp23008
 </code> </code>
  
 ===== References ===== ===== References =====
   * [[http://www.elektronx.de/tutorials/porterweiterung-mit-mcp23017-und-i2c/]]   * [[http://www.elektronx.de/tutorials/porterweiterung-mit-mcp23017-und-i2c/]]
software/programming/i2c/shell.1488895807.txt.gz · Last modified: 2017/03/07 15:10 by admin