Why IC2 ? ? ?
kenwtn
Posts: 250
··· Ok I am a Newbie and sure do not know as much as I should about electronics. But I keep seeing and hearing about IC2 which as I understand it is 2 wire serial communications between Masters and Slaves Modules. Now for my question why is IC2 better than simple 1 one wire serial communications, other than using up another pin and running another wire? In tests I have run I have connected multiple BS2 stamps together with a single serial communication line and assigned the modules or BS2 stamps a device ID. There where no apparent problems that I could see when doing it this way VS IC2.
Comments
I2C is meant to be used between devices on a single piece of equipment.
I2C is much faster and does not require a precise clock on both devices.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"Ability may get you to the top, but it takes character to keep you there."
·
Philips invented·I2C for use between microprocessors and control circuits in their televisons and VTRs, but not as an interconnect between consoles.
Keep in mind that there will nearly always be more than one viable solution to any problem. I2C is a nice solution in many cases because of its acceptance and the wide variety of parts available.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Asynchrounous communication can implement some of the above features, but always at a cost. Like #3 can be done asynchrously, but it requires a datarate synchronization packet which consumes bandwidth.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
·· From the replies that I have gotten I am now convinced of going with two wires and using IC2 for module to module communication.
·· Agian I want to thank all of you that replied.
And you dismiss that 'speed' advantage way too easily. In engineering, we make trade-offs all the time between cost, simplicity, and speed. The BS2 implements the RS-232 standard signaling for any pin, with great simplicity. But the speed is limited to 56K baud, and 9600 baud is better. And it's nice to be able to use one wire (ok, three -- TX, RX, and GND) and just have the signal 'work'.
The BS2 does NOT implement I2C as flexibly as it implements RS-232. Even the 'three-wire' SPI standard implemented on the BS2 by SHIFTIN and SHIFTOUT has the 'master-slave' problem -- the BS2 can ONLY act as an SPI 'master', NOT an SPI 'slave'.
If I was creating a new design with a BS2, I would implement a 'bus' using the SERIN/SEROUT signals (as it sounds like you have already done, using "!" as an attention character). I would stay away from trying to use I2C as a 'general purpose' bus between boards -- usually it is used to reduce wire count for local EEPROM/UART IC connections.