Question on Dual MCU system with a memory interface

Hello All,

I was wondering if anybody knows any company that sell Arduino board with dual MCU that are interface to each other via a Memory and few signals.
See the link below

http://forum.arduino.cc/index.php?topic=115711.0

I am looking for something similar with a memory between the two microcontrollers for data exchange between both microcontrollers.

Many Thanks,
cserge

Here is a dual MCU : Cross Roads Electronics
Search for "Dual ATMega328P Board" on that page.

You want something with memory in between. Is that even possible ?
Can you tell what you want to achieve ? Perhaps more memory and more pins ? then use an Arduino board that has more memory and more pins.

I didn't read the other thread, but what I might try is attaching the SPI ports of 2 UNOs together for high-speed comms. Use interrupts via other pins for signaling data-ready, etc. You could pogo the 2 UNOs back and forth, as to who would be the Master and who the Slave.

To add memory to the scheme, I would wire a 23LC1024 128 Kbyte SPI RAM chip to the same SPI buss. Both UNOs could read and write to it. Who gets the go ahead to be Master would be decided via the interrupt scheme above.

One UNO could write into the RAM at high-speed, and then signal the other UNO using the separate interrupt, and then relinquish control of the SPI buss, and the other UNO could read the data out. You would want pullup Rs on the SCLK and RAM CS lines to keep those pins in a proper state during Master switchovers.

It might work.

Hello Peter_n,

Thank you very much for sharing your website with me. I saw in your website just below
"12x8 LED Multiplexed Matrix Driver With USB/Serial Adapter"

There is a system in a blue package. Could you please tell me, where do you get that type of package? So I can put my system inside that type of package. Many Thanks,

Hello Oric_Dan,

Thank you very much for your email. What you have described is absolutely what I am looking for even if I will be happy if one microcontroller was designated as a master and the other one as a slave permanently.

The Master Microcontroller will only write to the Memory and the slave only read from the memory.

The system will also have a signal going from the Master to the Slave to notify to the slave when the Master has written to the Memory and the slave will have a similar system to notify the master when it read from the memory.

The most interesting thing will be if the system can keep the size of an Arduino Uno or Mega.

My question was, does anybody know any company that sell such kind of board?

Many Thanks,
Cserge.

Don't know about commercial products, but I miscalculated one thing yesterday. I forgot you cannot simply change SPI Masters to Slave and back in the context of the SPI RAM chip, since you'd need to cross-wire MISO and MOSI between the UNOs so they could intercommunicate directly. However, you could wire them both as Masters to the SPI RAM chip, so they could both read or write RAM, and then use the separate interrupt pins to coordinate between the UNOs as to when each would enable its SPI port to the RAM chip.

UNO #1: "I've finished writing to RAM, and relinquished the SPI buss".
UNO #2: "OK, I'll enable my SPI Master, and read the data".

Or use an I2C SRAM.

The keyword is "dual port"...

https://www.google.com/search?q=dual+port+spi+ram

https://www.google.com/search?q=dual+port+i2c+ram

Dual port SRAMs are not cheap, and with I2C/SPI interface are not generally available:

Easier to use simple handshake between master devices signaling relinquishment of the control lines, be they I2C, SPI, or parallel.

Yeah, +1 for Bob, -1 for CBadly (just kidding, CB).

Hello all,

It seems that no company can provide the type of board that I am looking for.
Do any of you know someone that can sell a PCB with my system requirement?

Many Thanks,
Cserge

Can you tell what the project is about, what is your goal ? We might know a better solution.

To me it seems that you want to make some kind of two-headded Frankenstein-Arduino. It is not Halloween, and too early for Aprils-fool-day.

Hello Peter_n,

It is a very simple, you have two systems A and B.
The data acquisition is done with system A that receives the data at the rate of “0.1 upto 2 second”.
The system B needs up to 30 second to deal with every data presented to him by system A.
So every time you lose almost 20 data because the system B is too slow.

So if I had a memory, I would place some data coming from system A there while trying to improve the capacity of system B.

But there is another way, you can help me. Please see the question I had asked above below.

=========================================================
Hello Peter_n,

Thank you very much for sharing your website with me. I saw in your website just below
"12x8 LED Multiplexed Matrix Driver With USB/Serial Adapter"

There is a system in a blue package. Could you please tell me, where do you get that type of package? So I can put my system inside that type of package also. Many Thanks,

============================================================

Cserge

Did my post get lost?
What's wrong with dual MCU card with I2C SRAM added?
http://www.crossroadsfencing.com/BobuinoRev17/

That is excellence, I did not see your post. Do you sell it?
Many Thanks

Yes I do. Bare boards only, kits, assembled boards. Which would you prefer?
You can PM me, let me know address for shipping also.
Robert

To me it seems that you want to make some kind of two-headded Frankenstein-Arduino. It is not Halloween, and too early for Aprils-fool-day.

Peter, I see the project as described as having all sorts of useful applications. One processor for acquisition, another processor for processing, another processor for displays, each doing its job, and passing the data along. You could do double-buffering, all sorts of things.

Nowadays, a lot of people would jump to a much faster processor, like an ARM with a lot of RAM and which could do everything in the one cpu, but the system proposed is viable for many purposes.

The basic idea is not too different from what I'm doing with my home automation system, except I am using RF and RS232 for transfers. There are a bunch of Remote Nodes doing data collection, and sending it to a central Hub via 433 Mhz RF. The Hub then consolidates and processes the Remote Node data for transmission to the Base Station, which does displays and Ethernet to Web transfers. Actually, there are now 2 Hubs operating with different sets of Remotes on different RF frequencies. Currently the Hubs send their data to the Base via RS232, but if I had a huge amount of data to transfer, going to such an SPI buss system for transfers would be much more efficient, as the Base has plenty to do on its own time.

The Base Station is sitting there operating the LCD/joystick menuing system, posting tweets, xively updates, and emails to the internet, and also serving local webpages via the router to my Android tablet. With OP's idea, when the Base has its Flag down, the 2 Hubs can dump new data into the shared SPI RAM, and then the Base can look at it when ready, and without having to wait on the Hub transfers. The scheme has lots of possibilities.

EDIT:
This thread actually gave me some new ideas, :-). Eg, this would be a much more efficient way to transfer an "image" from a Remote Node camera via a Hub and then into a buffer in the Base Station SPI RAM, rather than sending it over RS232 from Hub to Base [assuming I can ever get the darn OV7670 camera working right].

OP gets his very first Karma, +1, :-).

The data acquisition is done with system A that receives the data at the rate of "0.1 upto 2 second".
The system B needs up to 30 second to deal with every data presented to him by system A.
So every time you lose almost 20 data because the system B is too slow.

So if I had a memory, I would place some data coming from system A there while trying to improve the capacity of system B.

I guess. Equally, it sounds like a good excuse for using interrupts to read the data, and some sort of foreground task to do the processing.

A big problem is that the small AVRs just don't have an "external memory interface." Reading or writing to an I2C memory is relatively slow, and may add more complexity than it's worth.

I wouldn't search around for dual-port I2C memories, though, even in a dual AVR situation. Just attach your memory to the data-collection MCU, and use it as a "smart buffer memory" for the other controller, using SPI, I2C, or some other communications scheme between the two AVRs.

westfw:
....
A big problem is that the small AVRs just don't have an "external memory interface." Reading or writing to an I2C memory is relatively slow, and may add more complexity than it's worth.

This is why the main emphasis here has been on SPI RAMs. The 23LC1024 is 8-pin for easy interfacing, has 128 Kbytes of RAM, operates at both 3.3V and 5V, and runs up to 20-Mhz clock rate. Perfect for the microcontroller world. Microchip knew what they were doing when they designed this chip.

I2C, SPI - either way you need a way to create a bus so multiple masters can access the part.
I2C - maybe slower, but I recall that only 20 bytes were being transferred?
So the bus can just be SCL, SDA, and one more pin that both sides monitor to see if the master is accessing the part.
SPI - fast, no doubt about that. Both sides need something like HC125 to buffer the CS, SCK, and MOSI outputs and not drive them when not active. CS can be used to enable the OE pins. And still need a line that both sides can monitor to see if the part is free. I was thinking monitor the other guy's CS, but if the data is being transferred in small chunks, with many chunks to complete, than a separate line would be better.
I suppose if both processors were 1284Ps, with their 16K of SRAM memory each, then the Master could send data to the Slave directly with SPI bus between the two microcontrollers, and the slave could do its processing while master gathered more data ...

I was figuring maybe only 20-bytes today, but tomorrow it's something else. In my case, I figure I can use the scheme for moving images from the Hub into the Base Station SPI RAM while the Base is doing something else. I hadn't thought about that before, when I was just relying on RS232 for comms between the 2 nodes.

Both sides need something like HC125 to buffer the CS, SCK, and MOSI outputs and not drive them when not active. CS can be used to enable the OE pins. And still need a line that both sides can monitor to see if the part is free.

I don't think you really need the buffer as long as you have a good "separate" handshaking system between the 2 nodes to prevent them both from enabling their SPI busses at the same time. The AVR pins can do hi-Z without buffers. Even with the buffers, you still need the handshakes. Plus, I "always" use series-Rs in all my I/O lines, which helps keep 2 pins both set to output from bashing each other. So, the key is really good handshakes between nodes so they don't conflict.