Amc 6821
Amc 6821
Amc 6821
(I2C Communication)
odroid@odroid64:~$ su
Install Git:
root@odroid64:~# apt-get install git
Step 3:Set Priority for gcc and make high priority for gcc-4.9
root@odroid64:~# cd /usr/src
root@odroid64:/usr/src# git clone --depth 1 https://github.com/hardkernel/linux.git -b
odroidc2-3.14.y
Cloning into 'linux'...
remote: Counting objects: 51208, done.
remote: Compressing objects: 100% (47984/47984), done.
remote: Total 51208 (delta 3707), reused 20881 (delta 2572), pack-reused 0
Receiving objects: 100% (51208/51208), 139.38 MiB | 2.96 MiB/s, done.
Resolving deltas: 100% (3707/3707), done.
Checking connectivity... done.
Checking out files: 100% (48395/48395), done.
root@odroid64:/usr/src# cd linux/
root@odroid64:/usr/src/linux#
Now using Down Arrow key Choose the Device Drivers and then Enter
Now using Down Arrow key Choose the Hardware Monitoring Support and then Enter
Now using Down Arrow key Choose the Texas Instruments AMC6821 and then press Y
Now Press S to Save and press E to Exit from curent window until it shows main window
finally press Esc until you see this window
Step 10: Copy the compiled files to the boot drive and reboot
root@odroid64:/usr/src/linux#cp -f arch/arm64/boot/Image
arch/arm64/boot/dts/meson64_odroidc2.dtb /media/boot/
root@odroid64:/usr/src/linux#sync
root@odroid64:/usr/src/linux#reboot
Step 12: Check i2cdetect to verify i2c library (Example Address : 68 for rtc-ds1307)
root@odroidc2:/usr/src/linux# i2cdetect -y 1
[Note:1-we are using 1 I2C Device]
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@odroid64:/usr/src/linux#modprobe aml_i2c
root@odroid64:/usr/src/linux#modprobe i2c-dev
root@odroid64:/usr/src/linux#modprobe amc6821
[Paste the following content and save it by Ctrl+x and Y and Enter]
aml_i2c
i2c-dev
amc-6821
[Paste the following content and save it by Ctrl+x and Y and Enter]
# Setup AMC6821
echo amc6821 0x4f > /sys/class/i2c-adapter/i2c-1/new_device
[Note: where 0x4f replace with your device address]