Re: i2c1 on the Beaglebone Black

3,837 views
Skip to first unread message

ky...@cranehome.info

unread,
May 13, 2013, 5:16:52 PM5/13/13
to beagl...@googlegroups.com
Not an overlay but.... 

I added these to am335x-bone-common.dtsi and got all three I2C devices in /dev



i2c1_pins: pinmux_i2c1_pins {
                        pinctrl-single,pins = <
                                0x158 0x72      /* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE2 */
                                0x15c 0x72      /* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE2 */
                        >;
                };



&i2c1 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins>;

        clock-frequency = <100000>;
};


If you browse though the source file it should be fairly self-explanatory where each snippet should go.  Tested the bus and it works just fine!


On Sunday, May 12, 2013 10:23:46 AM UTC-5, Hussam Al-Hertani wrote:
Hi, I was wondering if anyone had success activating i2c1 on the Beaglebone Black using Device Tree overlays. It seems that i2c2 is enabled by default as i2c-1 in sysfs. And i2c0 enabled by default as i2c-0 in sysfs (but used internally i.e not on headers).

Examples of Device tree overlays for activating i2c1 would be very much appreciated.

Thanks!
Hussam

Brent

unread,
May 27, 2013, 1:45:03 PM5/27/13
to beagl...@googlegroups.com, whu...@unm.edu
This file is located in the kernel sources... I don't think you will find it on the BBB.  You will need to get a copy of the 3.8 kernel and then you will find the file in the arch/arm/boot/dts/ directory.

On Tuesday, May 21, 2013 1:04:51 PM UTC-4, whu...@unm.edu wrote:
Hey, I tried to perform this solution, but I was unable to find the .dtsi file on my BeagleBone Black. What program is required to open the file? I located the am335x-bone.dtb and am335x-boneblack.dtb files, but I did not have a am355x-bone-common.dtsi file. I searched the entire file system on Angstrom and on XUbuntu on my microSD. I am trying to enable all of the i2c serial ports, and any help would be appreciated. 

Thank you,
Welsey  

bmfc187

unread,
Jun 9, 2013, 11:30:51 AM6/9/13
to beagl...@googlegroups.com
Hello, I am also trying to get i2c working. I only require a single connection, so i dont know if i really to mess around with the kernel, and was kind of hoping to avoid it for now if possible. I purchased a 7-segment LED from Adafruit and am trying to get it working.  They have a library for arduino but not much support for getting it working with BBB.  So i soldered everything together, and have it connected to my breadboard and wired to my BBB.  I found some handy info on various websites which got me far enough to find my device with i2cdetect.  I am able to connect to p9_19 and p9_20 and then see my connection by doing

i2cdetect -r 1

which shows my new connection at 0x70.  I then found the i2cdump command on yet another site and ran it,

i2cdump -y 1 0x70

and i got some hex data that i HARDLY know how to decipher, but when i ran the i2cdump command it caused my LED to light up! Exciting! It began flashing some alien-looking characters, but i could not figure out how to make it stop other than disconnecting the GND, and then it stops, and stayed off again when i reconnected my GND wire.  So is my i2c-1 working properly?  Do I have to write a program to interface with the LED or can I issue it commands to make it do stuff?  What do i do next to make this thing show me the time, or a number that i choose, or ANYTHING useful, for that matter?  I downloaded the arduino library that they have and read thru it a little bit, but i don't know if i could PORT it...so i was hoping to just be able to issue a print command from a terminal and see an output.  Can i do that? If not, can somebody point me in the right direction? Thanks...

bmfc187

unread,
Jun 10, 2013, 5:44:05 PM6/10/13
to beagl...@googlegroups.com
bump...

Juan C.

unread,
Jul 5, 2013, 12:34:49 PM7/5/13
to beagl...@googlegroups.com
Were you able to figure it out? I used the same i2cdump command on my LED 8x8 matrix and it's flashing. 

On Monday, June 10, 2013 4:44:05 PM UTC-5, bmfc187 wrote:
bump...

bmfc187

unread,
Jul 7, 2013, 5:53:11 AM7/7/13
to beagl...@googlegroups.com
Im really not sure yet. I never got an answer to my question(s).  I  found this thread on the adafruit forums that has some helpful info for the 7-segment LEDs but i dont know how helpful itll be for the matrix ones. 

Juan C.

unread,
Jul 8, 2013, 9:44:19 AM7/8/13
to beagl...@googlegroups.com
Okay, thanks. I'll check it out and hopefully I can figure it out. If I do, I'll post a link on how to get it to work. 

Juan C.

unread,
Jul 8, 2013, 4:11:51 PM7/8/13
to beagl...@googlegroups.com
I got it working! I ended up using i2c commands to write onto the LED backpack. I'm going to write up a wiki on how I did it but here is what I did.
1) Installed node i2c from here: https://github.com/korevec/node-i2c
2) I programmed this code. To get it running, copy+paste this code on Cloud9 and run it. : https://dl.dropboxusercontent.com/u/9851737/8x8%20Bi-Color%20LED%20Matrix.txt

On Sunday, July 7, 2013 4:53:11 AM UTC-5, bmfc187 wrote:
Reply all
Reply to author
Forward
0 new messages