2 Atmega 328 micros on one board

Hello,

Maybe im missing something really obvious but I hit bit of a brick wall and not sure how to do what I want to do. I am trying to build a arduino board with 2 atmega 328 micros. One of them will be used to monitor some on board sensors and run a LCD. I want the other one free for add on shields and anything else Students want to connect at a later time. My idea is to have everything including all sensors, power s :grin:is is possible or how to go about it but I want the 2 micros to communicate through a I2C Bus. I thought about some kind of switch to select which one of the 2 micros to be programmed when uploading code. Is there a better way to go about this. Would I need to modify the bootloader at all to get them to talk to each other? Thanks everyone for your time.

I don't really see the point of your idea if both 328s need to be re-programmed regularly.

And if one of them only needs to reprogrammed very occasionally it might be easiest just to pull it out of the board and reprogram it elsewhere.

I suspect this question would be in a better place if was moved to the Microcontrollers section.

...R

Many sensors are controlled by the I2C bus. If you use that bus for the inter-processor communication it might not be free for the sensor readout. Which of the two processors did you intend to be the master, which the slave? What would be the benefit of having them on one board (except the form factor, but for that you can choose smaller Arduino variants)?

Now that I really stop and think about it, I probably would be better off using a port expander for the shields. so far I have parallel LCD, SPI/i2c and analog sensors + microphone and 1 atmega328 on one prototype board and all is working well. I would like to be able add shields as well but have basically run out of pins. If I use a MCP23017 port expander Can do it that way, i'm just not sure if it will be to slow?

If I use a MCP23017 port expander Can do it that way, i'm just not sure if it will be to slow?

Too slow for what to do? It's fast enough to light some LEDs but definitely not fast enough to drive an SPI bus in software.

Have you seen ny du '328P board?
www.crossroadsfencing.com/BobuinoRev17/

moderator update: fixed URL

If they are only going to communicate through i2c I don't see the point of having the on the same physical board. Why not just have a cable to connect the two? That way you always have the option of using them independently of each other too.

Looks neat?
Only needs 1 power cord?
Can have RS232 off the board?
Bragging rights? "Look, a multicore arduino!"


Or just use 2 prominis.

Hey CrossRoads, that's a nice design. Very similar to mine

Am I seeing double?

3! Cool 8) Nice photoshop job!

Looks like photo shop to me too :wink:

Photoshop? :open_mouth: I haven't got money to waste on things like photoshop.

It was pbrush.exe :slight_smile:

Good job.

Very realistic looking, whatever the tool used.

Nice one KenF. Got me thinking for a second :slight_smile:


Rob