You are not logged in.

#1 2014-05-26 16:45:38

stephenl7797
Member
Registered: 2014-02-09
Posts: 11

I2C over DVI/VGA

Im working with drivers and hardware for my first time and Im trying to get I2C data over DVI. I have a magnetometer that is supposed to be used with a micro controller like an Arduino, but I want to just use it with a desktop. It might not be possible, but hey- Ive learned a lot so far. Feel free to answer only questions you know or tell me Im wrong.

I'm trying to start by getting input from the device (called HMC5883l) over DVI or VGA and Ill worry about the i2c data format later if possible. DVI/VGA have the necessary busses for an i2c connection.

How can list all ioports my system has? 'less /proc/ioports' seems to be what I'm looking for but everything is under PCI and they have unexplained names. Since Im using fglrx, I thought i915 would be unneeded, but it still is needed. I have a few VGA/DVI ports of by gfx card and motherboard. I use the gfx cords to display to my monitor and I want to use the motherboard ports for the magnetometer. I know they have power because I got LEDs to light up. If the ports will work, I believe I just need their address regions so I can access them from a module.  Later I think I need to rmmod i915 so I can use the VGA/DVI motherboard inputs, but it seems to be being used even though im not using catalyst pxp. I thought if you use a video card that the computer just hands all video processing the the video card and so an Intel Graphics driver wouldnt even be needed.

I will have more questions regarding adapting i2c drivers for the magnetometer or writing my own using the i2c headers if I ever get past accessing the device.

Thanks.

Last edited by stephenl7797 (2014-05-26 16:59:45)

Offline

#2 2014-05-26 18:03:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,803

Re: I2C over DVI/VGA

Interesting.  I cannot offer much in the way of advice here, it sounds like there is quite a learning curve there.  Are there any other interfaces available on your system?  If you have a parallel port, it is simple to create an i2c interface by "Bit Banging" the parallel port using it as GPIOs.  But, the really simple way to do this would be to just use a little Arduino as you indicated.  The Arduino appears as a USB serial port when connected to Linux.  All it would take is some firmware on the Arduino to read the magnetometer and stream the data to Linux.  Then, you can just stream from the /dev/ttyUSBxx device node.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-05-27 12:10:01

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: I2C over DVI/VGA

If I understand correctly, you want to get data from the magnetometer to the computer over VGA/DVI. I would have a look at Intels open source driver (never used or even looked at them, so I assume here pretty much everything). If they have a simple code base for communication over VGA/DVI then try to isolate it and run a pulsating signal over one of the pins. I fear that you will spend (100 - 10^(-6)) % of time trying to get data across the gpu, unless there is something easier to communicate with in between or the code is easy to understand, isolate and use. Simply asking on one of the mailing lists should clear things up.

Parallel and serial ports are almost extinct these days on the usual pc consumer market, so I would also recommend USB for the magnetometer-pc connection. However an Arduino board seems like an overkill. Most of Atmels AVRs can use v-usb, so one ic, that you can connect to USB on one side and directly to the magnetometer on the other side, should be sufficient. Only a few other parts are necessary. But you would need a programmer, however there are some for reasonable prices, like the USBtinyISP variants/clones.

Is this a project for your school or university by any chance? Some of these links might interest you: 1, 2, 3, 4, 5 and 6. Going the way I described, you should be able to get data from the HMC5883l to the laptop/pc at a pretty high sampling rate for data acquisition/visualisation. What is the ultimate purpose for this project? Do you want to measure magnetic fields, near electric motors for example?

Offline

Board footer

Powered by FluxBB