dual-coring the arduino

-hi all,

I have a project that is too much for one arduino to handle. When I try to expand my home power metering device to publish via the ethershield, it no longer works. So I thought I’d let another arduino take over and do the rest. I have piggybacked a duemilenova with a pro and will probably use i2c for communication. However, the rx/tx leds are constantly lit on the 2009. First I thought it was d0 and d1 causing confusion with two boards, but it is still the case after I cut the headers for d0 and d1 AND Vin.

Does anyone have a clue?

Joachim

For I2C you only need pins 4,5 and ground and power connected.

You upload sketches to each and use the wire library to talk to the slave and master.

Heres a few links

Using two lillypads
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1201476854/5#5

How to Connect Multiple Arduino Microcontrollers with I2C
http://hacknmod.com/hack/how-to-connect-multiple-arduino-microcontrollers-using-i2c/

And a link talking about dual core 168s
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1205243372

Hope that helps

I have a project that is too much for one arduino to handle. When I try to expand my home power metering device to publish via the ethershield, it no longer works. So I thought I’d let another arduino take over and do the rest. I have piggybacked a duemilenova with a pro and will probably use i2c for communication. However, the rx/tx leds are constantly lit on the 2009. First I thought it was d0 and d1 causing confusion with two boards, but it is still the case after I cut the headers for d0 and d1 AND Vin.

what do you mean by piggybacking? How do you have these poor things connected?

2 stacked arduino’s? Now there’s a neat way to totally confuse 2 microcontrollers…

I can see it now…

All that TX RX activity? Heck yeah! The 2 arduino boards are stuck there yelling at you… “It does not compute!” and you are just watching it thinking… “Do something!”

Yea… me trying to be funny…

Thanks,

Yes, the two arduinos are stacked. It’s a quick way to check the sketches while waiting for batchpcb. Now I’ve cut the headers for d0, d1 and Vin, but the tx/rx leds are lit when I connect the usb power to one of the boards. However if I disconnect the boards, connect power to one and then connect the boards, the sketches work fine and they are communicating over i2c.

Is this a matter of drawing enough juice (for two boards) over usb once connected ? I cannot think of other reasons for this behaviour. Anyone?

Joachim

Well, I was trying to be funny… but if you stack them… they will only fight with each other unless you do something to prevent it.,

Well I think you are funny, but I would laugh out loud if I could understand why they should be fighting. Any pins not in use should not affect any of the two arduinos, should it? And it works well when the 2009 has started up before I connect the pro.
Beats me.

Since the digital i/o pins “float” (tri-state?), as long as you were careful and didn’t try to assert two of the pins at once (write mainly; reading would probably be OK), it should be OK - as far as the other pins, I am not sure, but they would probably be OK as well. What I really don’t know is how well things would play together when you activated the internal pull-up resistors, or added your own external ones.

By piggybacking two boards, you’ve created (essentially) a parallel bus. This opens up some interesting possibilities, both in signaling, as well as in practical applications (in theory, you could use some of the lines as address control lines, and others for data, or multiplex them; then hook up a bunch of non-serial RAM, which presents an interesting solution to some higher-speed RAM hungry projects; however, I2C-based RAM can probably be accessed as fast or faster).

Hopefully someone more experienced in these matters will answer this question more authoritatively…