Is it possible to implement onewire communication between two atmega328?

In theory yes. You would need to implement a 1 wire bus slave as well as the master implementation already in the library.

Maybe its just me but the implementation of the onewire library seems to be a bit controversial. I.e. which version to download and how to get it up and running. Following the forum on onewire problems it seems that it is not that easy to get it up and running.

I have never had any problems with the standard library version.

Is it possible to implement onewire communication between two atmega328?

Did you mean JUST two? Or two to being with, and more later?

If just two, what would be the advantage over a serial link?

If more than two, you should understand that the 1-Wire system expects one machine to be the "master". It can run a MicroLan of many subserviant devices.

I'm trying to set up the same thing. How do you do this?

I have 2 Arduino Diecilima and a Seeeduino Mega. I want to connect them all, using 1-wire or 2-wire. Cant use the TX and RX because I'll need those to connect to my Parallax RFID reader. What would be the best way to accomplish this?

I'm building an embedded PLC with the atmega328. Each atmega will be in its own enclosure with DIN rail mountable connectors. The atmega will need to have an ID so I can communicate with it from a master. I thought of using i2c but the units must be mountable at a capable distance of 70cm. I will have DI, DO, AI and AO cards. I am in the process of developing a SCADA package with Processing. The master will convey all the BUS information from the units and send it via RS232 to Processing which splits the information in the necessary variables to display on the screen. I have already develop libraries for dial gauges, bar graphs, sliders and the ability to log alarms and graph variables over time. which can be imported into Excel via CSV format.

But the communication from master to slaves is the critical component, This needs to be full proof.


... can't use TX...

Ah! But you can have a second (or third, fouth, fifth!) serial channel, too. See....


... must be foo-proof...

Can't you still use a (nice, simple) serial link, but include (by software) checksums and acknowlegements?