Go Down

Topic: Building a dual MCU project with two ATmega328 chips (Read 9 times) previous topic - next topic

Constantin

One protocol I have been very happy with is EasyTransfer by Bill Porter. Available as a I2C as well as Serial library. Makes communications between two Arduinos a snap. Used it for 2 328's, a 328 and a 1284p, etc. Highly recommended.

tim7

Erm, not quite sure I'm on the same wavelength.  Are you mixing up bit 4 & 7?  As far as I can make out 0xF0 is not an allowed combo.

0xE0 = 0b11100000 : CKDIV=1 (disabled), CKOUT=1 (disabled), SUT=10 (65ms startup), CKSEL=0000 (ext. clock)
0xF0 = 0b11110000 : CKDIV=1 (disabled), CKOUT=1 (disabled), SUT=11 (reserved), CKSEL=0000 (ext. clock)

CrossRoads

#22
Aug 01, 2012, 09:31 pm Last Edit: Aug 01, 2012, 09:35 pm by CrossRoads Reason: 1
@tim7, You are right - I was flipping the wrong bit of the nibble. 0xe0 it is.

@Constantin, Hadn't got that far yet.  Still working on getting 2 uCs running of 1 crystal so I can some boards ordered. I think I have enough jumpers/headers on the board so any of those kinds of comm's can be set up.
See the schematic in Reply #9 of this thread. Have to tweak the crystal connections a little - xtal2 of chip1 will feed xtal1 of chip2. chip2 will have fuses set to allow external clock.
Think I'll do the connections with solder jumper pads so the two can be isolated if needed.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Constantin

No worries. Just thought I'd chime in re: using the I2C bus for the communications. Pretty easy to implement and requires few traces and components on the board. Maybe give a choice using a shunt jumper or a cutable pad for SDA and SCL?

BlueJakester

I'm following this thread with great interest. Would definitely like to try out a dual '328 board with I2C when it's ready.

I hope I don't get in over my head though! :D

Go Up