external memory interface to use different peripherals on Arduino Mega

After reading through the ATmega2560 manual I couldn't help but wonder the possibilities using the external memory mapping...

One that immediately came to mind would be the Ethernet board with the Wiznet chip. That chip can be used by external addressing and would make the entire Ethernet interface a breeze to program and because of the higher space on the mega2560, hosting a nice webpage could be really sweet.

The external memory interface is just a parallel bus in a way, you can try to have an intermediate microcontroller to detect "write" commands and perform actions based on that so you can avoid coding peripheral drivers, is that what you are talking about?

If this is strickly for the Wiznet, why not just get a microcontroller with a built-in Ethernet MII or RMII interface MAC and get a PHY chip instead? You can hit awesome performance and use libraries that are even more portable than the one dedicated to proprietary hardware such as the Wiznet since MII and RMII MACs are all standard.

I'm talking about mapping stuff in the external memory space... sure, there would be some address latches and logic gates needed, but it would be a great expansion.

What I was referring to is that writing to an external address is simpler and faster than communicating by I2C or SPI. And this board can do this.

All you need to access up to 64k external RAM is a 74xx373 latch. Add a few IO lines and you can access as much RAM as you like in pages.

Whether or not the C compiler handles this I'm not sure. At ASM level IIRC any access above normal RAM is trapped by hardware and sent to the external.


Rob

bubulindo:
What I was referring to is that writing to an external address is simpler and faster than communicating by I2C or SPI. And this board can do this.

Ok so what are you trying to communicate with?

frank26080115:

bubulindo:
What I was referring to is that writing to an external address is simpler and faster than communicating by I2C or SPI. And this board can do this.

Ok so what are you trying to communicate with?

The Wiznet chip is a good example, you could place parallel ADs, alphanumeric LCDs, memory...

I'm not trying to communicate, I don't even own a Mega board. But that it would be a nice thing to have, it would...

Graynomad:
All you need to access up to 64k external RAM is a 74xx373 latch. Add a few IO lines and you can access as much RAM as you like in pages.

Whether or not the C compiler handles this I'm not sure. At ASM level IIRC any access above normal RAM is trapped by hardware and sent to the external.


Rob

I believe the C compiler works if you specify a pointer to the desired location.

bubulindo:

frank26080115:

bubulindo:
What I was referring to is that writing to an external address is simpler and faster than communicating by I2C or SPI. And this board can do this.

Ok so what are you trying to communicate with?

The Wiznet chip is a good example, you could place parallel ADs, alphanumeric LCDs, memory...

I'm not trying to communicate, I don't even own a Mega board. But that it would be a nice thing to have, it would...

So this will work with anything that uses a compatible parallel interface. There's nothing stopping you from doing it, go try it out. I think all you need to do is read from and write to pointers beyond the AVRs internal memory and the AVR will automatically use the external interface when it needs to. Try it out and disassemble the compiled C code to see if the assembly is going to do what you expect.

frank26080115:
There's nothing stopping you from doing it, go try it out.

The description of the forum said, and I quote, "shields you are designing or that you think would be nice to have, Arduino compatible platforms, board comparisons, etc.".

Telling me o do it, is a bit against the purpose of this, isn't it? That being said, can I borrow a welding machine for the Wiznet chip and others like that? Because that kind of is stopping me from doing it.

Oh I assumed you had an ATmega to work with

You can test compile some code, mapping variables beyond the normal RAM space, read disassembled code, maybe the AVR Studio simulator will show you the pin states of the external memory interface while it's running

Also this is relevant but might help
http://www.nongnu.org/avr-libc/user-manual/malloc.html

I have read that... and in the beginning of the post (this is the hardware part of the forum) I said that it is possible to use external memory.
I first found it on the manual and then I googled the subject and found that same page. It is also possible to use a pointer directly without malloc, but some changes need to be done to the compiler.

Anyways, the purpose of this post was merely to give the idea of someone developing a shield based on external memory interface. It isn't a programming issue because, as you found out, it is possible.
It is really a hardware issue, as any board to do it will involve a bit more knowledge about circuit design and it can't even be easily prototyped, even if you have a Mega board. That's all.