The MP3car.com Store The MP3car.com Store    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Hardware Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-21-2007, 07:19 AM   #1
Low Bitrate
 
Join Date: Nov 2004
Location: UK
Posts: 102
Simple i2c software / hardware

Can any body point me in the direction of an easy to use i2c programming system and interface hardware?

I'm trying to design a hardware fader for my stereo soundcard. By splitting the stereo signal into front & rear, and then passing each channel through a variable resistor I hope to be able to control the f&r volume separately.

This would be dead easy with a couple of manual potentiometers, but I'd like to be able to do it from the touchscreen.

From searching the web I've come across a range of digital potentiometers that can be set and controlled over the i2c protocol, and I've even seen cheap PC hardware.

http://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm

However it's the software side of things that I can't get my head around. My programming skill are rudimentary at best (I can just about get my head around simple VBA).

What I was hoping to find is a simple package of i2c hardware and software, where I could call a DLL from autoit, and send the string of data bits I want to the potentiometer - but every system I see is far more complex than this, and way beyond my capability.

Does anybody know of i2c programming for dummies software?
Vodkapete is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 08-21-2007, 10:29 PM   #2
Newbie
 
Join Date: May 2004
Posts: 43
The USB-I2C device you mentioned is already using a virtual COM port. So it is like accessing it with hyperterminal. Are you finding it difficult to use the COM port or understanding how I2C works?
CombatCQB is offline   Reply With Quote
Old 08-22-2007, 07:29 AM   #3
Low Bitrate
 
Join Date: Nov 2004
Location: UK
Posts: 102
I believe I understand the principles of i2c - but I'd be the first to admit there's a big difference between this and actually being able to implement it!

I think I'm bumping right up against my skill level here - I don't have the programming or computer skills to be able to communicate directly through the COM port.

I guess what I was hoping for is a way I could type something like :

SEND_I2C (001010101101010110)

and that would do the job.

I have no doubt that with time and effort I could work out what I need to, but I might instead go back to the drawing board and find a less elegant way to achieve what I want.

Ian
Vodkapete is offline   Reply With Quote
Old 08-22-2007, 02:55 PM   #4
Newbie
 
Join Date: Feb 2007
Location: Santa Cruz, California
Posts: 26
I did a quick search using google and there are several examples of communicating through the COM port using Visual Basic. You might try that route to get some example code you can use. If you can succeed in sending and receiving characters via the COM port from Visual Basic, then you can probably make your project work.

Try to find some example code, short the TX/RX pins of your serial port together, turn off hardware flow control, and write an application in VB that sends data out and prints what it receives. From there you can remove the short and add the I2C module and try to send the data patterns required to make it talk I2C.

You may end up with some routines like this:

i2c_write(address, data)
i2c_read(address)

I don't think Visual Basic supports binary representation of numbers, but I'm not a visual basic expert. You may end up calling it with decimal or hex equivalents of the address and data to write to your I2C device.

The protocol of the USB-I2C product you mentioned is fairly straightforward. If you get past the COM port test, then you might order one and give it a try. Looks to be reasonably priced.

Mark
bibaja_llc is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoTap used to develop custom software! Dodger1417 Engine Management, OBD-II, Engine Diagnostics, etc. 5 09-25-2006 10:51 AM
What hardware and software would I need to get a true decibel reading of my system??? kingeorge36 Car Audio 13 09-11-2006 02:25 PM
How to write software to interface with hardware? xLusi0n Software & Software Development 6 05-09-2005 04:32 AM
Someone please email Steve Jobs, this is out of hand DocNupe MacCar 31 04-18-2005 04:12 PM


All times are GMT -5. The time now is 12:22 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics