This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
software:programming:i2c:shell [2017/03/07 15:10] – [Using user space via i2c] admin | software: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 | ||
+ | </ | ||
+ | |||
+ | ==== Hardware detection ==== | ||
+ | Color table: | ||
+ | ^ Bit ^ mcp23008 ^ mcp23017 ^ | ||
+ | | 1 | L_GRN | ||
+ | | 2 | L_BLU | ||
+ | | 4 | L_RED | ||
+ | | 8 | R_BLU | ||
+ | | 16 | R_GRN | ||
+ | | 32 | R_RED | ||
+ | | 64 | WHITE | ||
+ | | 128 | 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 | ||
</ | </ | ||
===== References ===== | ===== References ===== | ||
* [[http:// | * [[http:// |