Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to use I2C

57 bytes added, 10:13, 17 January 2012
no edit summary
NOTE: This program is a beta version, it decodes EDID following E-EDID Standard Release A-1 from VESA using i2c-dev driver. There are some functionalities that are not implemented (see code comments) and other new ones that appear in other revisions. Besides, this program only parses the first EDID 128 bytes block. But this code is enough to learn to use I2C.<br>
More information about [http://en.wikipedia.org/wiki/Extended_display_identification_data EDID].<br>
= Feedback and Contributing =
i2c-3 i2c OMAP I2C adapter I2C adapter
</pre>
It's important than i2c-3 was enabled, because it connects to DVI-D by default.
= Compile and Run<br> =
Download '''(upload source code)''' [http://downloads.igep.es/labs/parse-edid-beta3.tar.bz2 parse-edid-beta3.tar.bz2] and extract it.
There are some things that is interesting learn, before compiling the program. Open it, seek next lines:<br>
Constant FORCE is defined to allow this program access to I2c, although other programs use it at the same time. It can be dangerous in writing operations but in read operations don't have problems.<br>
Constant ADDRESS is defined to acces in specific I2C address. In DVI devices, 0x50 is default address, that means that other peripherals can be connected to same bus with other 7 bit address.
See the code below:<br>
Compile program using your Cross Compiler, I used arm-linux-gnueabi-:
<pre>arm-linux-gnueabi-gcc parse-edid-beta2beta3.c -o parse-edid-beta2beta3</pre>
Run program as root. Pass the i2c number that you want to parse:
<pre>./parse-edid-beta2 beta3 -d 2</pre> 
= Results =
This is the result from a Samsung SyncMaster B2030HD display, you can contribute to this How-To adding your display information:<br>
<pre>root@localhost:~/I2CPROGRAM# ./parse-edid-beta2 beta3 -d 3
256-byte EDID successfully retrieved from i2c bus 3
Decode EDID information:
Monitor name: SMB2030HD
</pre>
 [[Category:Communications]][[Category:Tutorials]][[Category:How to forgeHow_to_forge]]
4,199
edits