odroid-h2:application_note:16port_i2c_gpio

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
odroid-h2:application_note:16port_i2c_gpio [2019/07/17 12:16]
john1117 [Connection Check]
odroid-h2:application_note:16port_i2c_gpio [2020/06/11 17:04] (current)
neal [Wiring]
Line 30: Line 30:
 ==== Wiring ==== ==== Wiring ====
 We're going to make an LED example with the GPIO expander([[http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf|MCP23017 Datasheet]]).\\ We're going to make an LED example with the GPIO expander([[http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf|MCP23017 Datasheet]]).\\
- +<tabbox H2+> 
-{{:odroid-h2:application_note:i2c_io_expander.jpg?600|}}\\+{{:odroid-h2:application_note:h2plus_i2c_io_expander.jpg?600|}} 
 +<tabbox H2> 
 +{{:odroid-h2:application_note:i2c_io_expander.jpg?600|}} 
 +</tabbox>
 Download fritzing\\ Download fritzing\\
 - MCP23017 board part ☞ {{ :odroid-h2:application_note:i2c_io_expander.fzpz |}}\\ - MCP23017 board part ☞ {{ :odroid-h2:application_note:i2c_io_expander.fzpz |}}\\
 +- ODROID-H2+ part ☞ {{ :odroid-h2:application_note:odroid-h2plus.fzpz |}}\\
 - ODROID-H2 part ☞ {{ :odroid-h2:application_note:odroid-h2.fzpz |}}\\ - ODROID-H2 part ☞ {{ :odroid-h2:application_note:odroid-h2.fzpz |}}\\
-- fritzing parts ☞ {{ :odroid-h2:application_note:i2c_io_expander.fzz |}}\\+- fritzing parts(H2) ☞ {{ :odroid-h2:application_note:i2c_io_expander.fzz |}}\\ 
 +- fritzing parts(H2+) ☞ {{ :odroid-h2:application_note:h2plus_i2c_io_expander.fzz |}}\\
  
 ==== Connection Check ==== ==== Connection Check ====
Line 45: Line 50:
 <tabbox kernel 4.18 or higher> <tabbox kernel 4.18 or higher>
 <WRAP group> <WRAP group>
-When you have wired the I/O expander to Pin #18(SCL) and #20(SDA).+When you have wired the GPIO expander to Pin #18(SCL) and #20(SDA).
   sudo i2cdetect -y -r 2   sudo i2cdetect -y -r 2
-When you have wired the I/O expander to Pin #13(SCL) and #15(SDA).+When you have wired the GPIO expander to Pin #13(SCL) and #15(SDA).
   sudo i2cdetect -y -r 3   sudo i2cdetect -y -r 3
 </WRAP> </WRAP>
 <tabbox Old kernel version> <tabbox Old kernel version>
 <WRAP group> <WRAP group>
-When you have wired the I/O expander to Pin #18(SCL) and #20(SDA).+When you have wired the GPIO expander to Pin #18(SCL) and #20(SDA).
   sudo i2cdetect -y -r 5   sudo i2cdetect -y -r 5
-When you have wired the I/O expander to Pin #13(SCL) and #15(SDA).+When you have wired the GPIO expander to Pin #13(SCL) and #15(SDA).
   sudo i2cdetect -y -r 6   sudo i2cdetect -y -r 6
 </WRAP> </WRAP>
Line 90: Line 95:
   -a, --all    All off or on   -a, --all    All off or on
 </code> </code>
 +
 +  * <color #ed1c24>If you're using an older kernel than 4.18, tap the "Old kernel version".</color>
 +
 +<tabbox kernel 4.18 or higher>
 +<WRAP group>
 +<WRAP column>
 +When you have wired the GPIO expander to Pin #18(SCL) and #20(SDA).
 +  sudo ./mcp23017.py 2 blink
 +  sudo ./mcp23017.py 2 -w 0 1
 +  sudo ./mcp23017.py 2 -r 5
 +</WRAP>
 +<WRAP column>
 +When you have wired the I/O expander to Pin #13(SCL) and #15(SDA).
 +  sudo ./mcp23017.py 3 blink
 +  sudo ./mcp23017.py 3 -w 0 1
 +  sudo ./mcp23017.py 3 -r 5
 +</WRAP>
 +</WRAP>
 +<tabbox Old kernel version>
 +<WRAP group>
 +<WRAP column>
 +When you have wired the GPIO expander to Pin #18(SCL) and #20(SDA).
 +  sudo ./mcp23017.py 5 blink
 +  sudo ./mcp23017.py 5 -w 0 1
 +  sudo ./mcp23017.py 5 -r 5
 +</WRAP>
 +<WRAP column>
 +When you have wired the I/O expander to Pin #13(SCL) and #15(SDA).
   sudo ./mcp23017.py 6 blink   sudo ./mcp23017.py 6 blink
   sudo ./mcp23017.py 6 -w 0 1   sudo ./mcp23017.py 6 -w 0 1
   sudo ./mcp23017.py 6 -r 5   sudo ./mcp23017.py 6 -r 5
 +</WRAP>
 +</WRAP>
 +</tabbox>
  
 {{https://dn.odroid.com/source_peripherals/h2/example_led_i2cgpio.gif?400|}} {{https://dn.odroid.com/source_peripherals/h2/example_led_i2cgpio.gif?400|}}
  • odroid-h2/application_note/16port_i2c_gpio.1563333371.txt.gz
  • Last modified: 2019/07/17 12:16
  • by john1117