Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: megabug on April 26, 2011, 09:35:26 pm

Title: Experience with software I2C?
Post by: megabug on April 26, 2011, 09:35:26 pm
Hi,
Has anyone here used software I2C with the Web platform? I would like to add some GPIOs and other stuff which uses I2C, but cannot use hardware I2C since the data PIN is on one of the EEPROM Pins! (And connot be remapped)

Thanks in advance ;)
Title: Re: Experience with software I2C?
Post by: ian on April 27, 2011, 08:35:01 am
Software I2C is pretty simple, here's an old library we used to use in the Bus Pirate:
http://code.google.com/p/the-bus-pirate ... /m_i2c_1.c (http://code.google.com/p/the-bus-pirate/source/browse/v2/source/m_i2c_1.c)

The current Bus Pirate firmware uses a more abstract library to save space. It is public domain instead of GPL though:
http://code.google.com/p/the-bus-pirate ... /bitbang.c (http://code.google.com/p/the-bus-pirate/source/browse/v4.3/source/bitbang.c)

It is based on this public domain example, it was pretty easy to follow and write my own:
//http://www.esacademy.com/faq/i2c/busevents/i2cstast.htm
Title: Re: Experience with software I2C?
Post by: megabug on April 27, 2011, 11:39:04 am
Ah okay, thanks. Will try it later when I'm home.

Just FYI: TLC59108 (http://http://focus.ti.com/docs/prod/folders/print/tlc59108.html) is a nice I2C PWM IC! there is also a 16port version of this. Oh and I also made eagle libraries of both chips, so if someone is interested in using it, I can upload the libs.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01012057456session_write_close ( )...(null):0
20.01052189048ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01052189824Database_MySQL->query( ).../DatabaseHandler.php:119
40.05382328560Database_MySQL->error( ).../Db-mysql.class.php:273