Go Down

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

BlueJakester

Jul 24, 2012, 07:27 pm Last Edit: Jul 25, 2012, 12:09 am by BlueJakester Reason: 1
I've been thinking about having a project with dual '328 MCU and using I2C for comm between the two.  I did some Google searching and found this blog, where the builder made a shield with a second '328. My objective is to have a lot of I/O pins.

http://blog.makezine.com/2010/01/11/homebrew-dual-core-arduino/

Does the above tutorial look like the best way to approach such a project? Maybe I should build a single MCU project with a more powerful MCU, like an Arduino Mega?

Thanks,
Jake

tim7

It can be very convenient to use several microcontrollers in one project.  For example, certain manufacturers sell LED displays with an ATmega328 as a display controller.  I built a project with several of these displays plus an Arduino, in effect making a 5 "core" device.

In another project I built the Arduino has to handle two simultaneous tasks: a user interface (via encoders, buttons, IR, and LED displays) plus some timed loops running in parallel.  I had to write some fairly complicated code to ensure the interface is responsive without affecting the accuracy of the timers.  With hindsight the project would have been a lot easier with two Arduinos.

The communication method you use isn't important: it can be serial, I2C, SPI, or simple signalling via digital I/Os.

A more powerful chip can certainly reduce the need for multiple microcontrollers, but it's not necessarily an easier or even a cheaper solution.

CrossRoads

Or use a '1284. 32 IO, 2 UARTs, more SRAM than a 2560, still available as a DIP.
See my signature link for some examples.
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.

CrossRoads

#3
Jul 24, 2012, 08:21 pm Last Edit: Jul 24, 2012, 08:22 pm by CrossRoads Reason: 1
Or, add a bunch of shift registers to a '328. I think the last picture at my link is a board with 12 shift registers. 96 higher current, high voltage capable Outputs.
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.

BulletMagnet83

Some of the more complicated projects I have in mind would benefit enormously from having a dual-MCU setup. I think it's a perfectly reasonable way of handling complex tasks if, like me, you lack the necessary coding skills to pull it off with a single high-end chip and aren't all that bothered about minimizing hardware costs for mass production :) One such idea was for an 80s style drum synth, and while the current "solution" is to use one MCU for all input control scanning and display twiddling and a whole other one for sample playback, I am sure a decent programmer could do the whole thing on a single processor.

I suppose it depends what you're better at. If you're more comfortable with complex hardware than tricky code, then two Arduinos (or equivalent) might be a good way of approaching a problem.

Go Up