Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:c2_hardware_1w [2016/05/10 16:59] ck.kim |
en:c2_hardware_1w [2016/11/03 09:05] odroid [Change the Default GPIO pin for 1-Wire interface] |
||
---|---|---|---|
Line 59: | Line 59: | ||
Two sensors in parallel. | Two sensors in parallel. | ||
- | **Change the Default GPIO pin for 1-Wire interface** \\ | + | ===== Change the Default GPIO pin for 1-Wire interface ===== |
Ex) Default GPIO pin change to GPIOX.BIT19 \\ | Ex) Default GPIO pin change to GPIOX.BIT19 \\ | ||
Please refer to below links for details related to gpio mapping in the device-tree.\\ | Please refer to below links for details related to gpio mapping in the device-tree.\\ | ||
Line 67: | Line 67: | ||
odroid@odroid64:~$ sudo apt-get install device-tree-compiler | odroid@odroid64:~$ sudo apt-get install device-tree-compiler | ||
odroid@odroid64:~$ fdtget /media/boot/meson64_odroidc2.dtb /onewire gpios | odroid@odroid64:~$ fdtget /media/boot/meson64_odroidc2.dtb /onewire gpios | ||
- | 31 113 0 | + | 18 113 0 |
- | odroid@odroid64:~$ fdtput /media/boot/meson64_odroidc2.dtb /onewire gpios 31 111 0 | + | odroid@odroid64:~$ fdtput /media/boot/meson64_odroidc2.dtb /onewire gpios 18 111 0 |
odroid@odroid64:~$ fdtget /media/boot/meson64_odroidc2.dtb /onewire gpios | odroid@odroid64:~$ fdtget /media/boot/meson64_odroidc2.dtb /onewire gpios | ||
- | 31 111 0 | + | 18 111 0 |
odroid@odroid64:~$ sudo reboot | odroid@odroid64:~$ sudo reboot | ||
</code> | </code> | ||
+ | If the reboot doesn't affect the dtb update, you need a hard reset(power off/on).\\ | ||
- | DS1820 change to connection Pin #11 | + | **Don't change the first number in the fdtget command output. For example, 18(0x12) is the GPIO group number.** |
+ | |||
+ | DS1820 is connected to Pin #11 | ||
Pin 1 (Left): Ground (-) | Pin 1 (Left): Ground (-) | ||
- | Pin 2 (Middle): Pin #11 C2 (GPIOX_19, GPIO111) | + | Pin 2 (Middle): Pin #11 C2 (GPIOX.BIT19) |
Pin 3 (Right): Ground (-) | Pin 3 (Right): Ground (-) | ||