Am Samstag, 29. Juli 2006 00:28 schrieb Stefan Eitel: > Von: Jan Kandziora > Gesendet: Freitag, 28. Juli 2006 11:10 > > > Hmm. I think the WRT54G board may have some support for I2C through these > > GPIO pins, too. It's pretty common for embedded boards to have an I2C > > hardware (shift register) at hand. Does anyone know certainly? Otherwise > > I will investigate on this. > > > > As we have I2C<->Onewire support in OWFS now, this could be a solution > > which avoids bitbanging (sloooooooow). > > I can't find any information about I2C over GPIO on Broadcom platform. > However I think this isn't the best idea at all; wouldn't it simply add > more overhead? Gpio->i2c->1-wire instead of gpio->1-wire? > Bitbanging is *pure* overhead, as the host processor has to control the timing of *each bit*. If this involves nanosleeps smaller than a tick time (on linux platforms configureable down to 1ms, this equals 1000Hz), the host processor will do busy-loops to achieve the proper timing.
Therefore bitbanging a serial protocol is a simple but slow solution which has to be avoided if any hardware-support for parallel->serial conversion exists. > GPIO communication via specific system drivers (i.e. bitbanging) seems > common and unproblematic. As mentioned, this way one can use MMC/SD cards, > or use the GPIO lines to drive IR LEDs (LIRC system driver for GPIO ports, > see http://forum.openwrt.org/viewtopic.php?id=735). > I don't know exactly what the timing requirements for MMC Cards are, but I'm pretty sure they feature a *synchronous* protocol (clock+data) which does not have any timing requirements. (By the way: i2c is a sychronous protocol, too) For LIRC, slowness like a slug isn't such a great issue, as the transmitter is only needed if some IR remote command has to be issued. That is about one signal of 100ms duration per minute in a typcial application, I think. > I had a conversation with an openwrt developer. Although he's not very > familiar with the 1-Wire protocol (neither am I), he's convinced that it > would work technical wise, > Yes, I'm sure it works, too. It's just not the preferable solution, but a "last exit". > but it may be a bad idea to directly connect an > external circuitry directly to the CPU without isolation. > That's another point, but not directly connected to bitbanging. You have to take care anyway -- an RC circuit and/or ESD protection diode should be sufficient, though. Jan -- ...very few phenomena can pull someone out of Deep Hack Mode, with two noted exceptions: being struck by lightning, or worse, your *computer* being struck by lightning. -- Matt Welsh ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
