Stellaris® ARM® Microcontrollers
Forum
Options
Subscribe via RSS
Forums
Interfacing with external memory
Posted by
christopholous
on
Jan 16 2007 00:31 AM
Prodigy
30
points
Hello, im using the 811 eval kit. One part of my project involves interfacing with some external memory.
I was wondering if there is a simple way to assign a number of GPIOs to represent a binary number based off values inside a variable (ie memory address). I can think of a way to do this but its a rather inefficient approach, so im wondering if there is a simple way that this might be accomplished.
Id appreciate you suggestions.
Report Abuse
Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
tinroofrusty
on
Jan 16 2007 02:21 AM
Intellectual
370
points
Since this product has no external memory bus (as you already know), creating a bus is going to take a few port pins and maybe some inefficiency. Efficiency is relative - this cpu can run near 50mips, we're not talking about a 8051 executing 1mip.
You have some choices depending on what it is you're actually trying to achieve - serially interfaced memory is the easiest, but the slowest. You can get FRAM devices up to 512kbits (maybe more now) that read a write reasonably fast and are non-volatile.
Assuming you want something like a standard 8bit bus - I'd suggest something like:
8port bits for the bus itself.
1 port bit for address latch low
1 port bit for address latch high
1 port bit for /wr
1 port bit for /rd
This involves outputting the address low(8bits) onto the bus port, then toggling the address latch low. You'll need something like a 74hc574 latch.
The high address is the same as above.
Then for a read, /rd = 0, wait,read the data from the port pins,then /rd = high
For a write, write the write data to the bus port, /wr =0, wait,/wr = 1.
This cpu can run at 50mhz, so the bus can be executed as fast as the old ibm XT bus. The code would execute in less than 1uS, so unless you're needing super speed, I think this may suffice. If you want to cut more cycles, write the bus code in assembler, but I think the 'c' compiler wont have too much trouble doing what you want fairly efficiently.
If you wanted to get a bit smarter, you could use a cpld and/or have an address counter so you can access the memory sequentially if required.
I'd have to question the economics of such a solution - you're tacking a lot of bits and bobs onto a little processor just for some external memory. The obvious solution is to choose a different cpu that has the external mem interface or more internal memory.
Report Abuse
Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
christopholous
on
Jan 16 2007 17:16 PM
Prodigy
30
points
alrighty thanks for your input, i guess ill do it the only way I can think of :P
Report Abuse
Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
steve8pi
on
Jan 18 2007 14:21 PM
Prodigy
100
points
If you want non-volatile memory, another option is Serial Flash, with the SPI interface. Should be able to connect it directly to the Luminary SPI port without any logic. I've seen parts advertised up to 128 Mbit (16 MByte). Nice small packages, too.
Mouser has several listed, from as low as $1.30 for single quantity of 64KByte.
Report Abuse
Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.