Interfacing memory mapped device to ATMega64

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello everyone.
I have yet another problem I ran into. I am considering using an
ATMega64 for a design and have a memory mapped device I need to
interface to it. The design must be as low-cost as possible. I ran
into a problem where the external memory interface for the ATMega64
has no chip select. I can decode a high address bit but would require
glue logic which drives up the cost. This would be horrible for the
design. Does anyone have any suggestions?
Chris

Re: Interfacing memory mapped device to ATMega64
Quoted text here. Click to load it

Hi Chris,
Do you have to decode at all?
If your external device is the only one on the bus, there is typically no
need.
Just connect the chip select signal to one of the address pins. Make sure
that the addresses you use to access the device have this specific
address-chip select pin low (because I assume that the chip select pin is
active low).
You have to verify that the chip does not toggle the address lines randomly
when no external accesses are made, but I don't think the ATmega64 does
that.

An alternative way is to use a one-gate SOT23 chip. You can get such a chip
for much less than 5 cents.

I hope my suggestions will help you.
Regards,
Anders Rosvall
www.EmbeddedArtists.com



Re: Interfacing memory mapped device to ATMega64

Quoted text here. Click to load it

How many devices do you have and big is the memory area for each?

Of course, you could use general-I/O and do the chip selects in
software. However, this has some downsides:
- you need additional time/code to switch CS
- code gets ugly
- needs more development time for software
- you are likely to forget some switches ;-(
- you could damage chips, if you activate multiple CS at once

 Jan-Hinnerk


Re: Interfacing memory mapped device to ATMega64

Quoted text here. Click to load it

Hi,
 I've used the ATMega128 with an Infineon CAN controller on the
external address bus. No glue logic needed. The mega128/64 will only
drive the !RD and !WR pins if the address is not used internally so
the !CS line can be held low. The external IC just maps into memory
multiple times. You would olny need to do address decoding if you
needed more than 1 IC on the external bus.

TTFN


Re: Interfacing memory mapped device to ATMega64

Quoted text here. Click to load it

If you only have one device, then just use an address line as Chip
Select. If you have more than one, then a 74HC 2 to 4 line or 3 to 8
line decoder is quite cheap, especially in the newer small package
sizes. I have found that a 74HC device in a TSSOP package can be
as much as 5x cheaper than a DIP package.

Regards
  Anton Erasmus


Site Timeline