Adding external memory to Atmega128. Part 1. Schematic

Atmel AVR microcontroller Atmega128 is equipped with internal 4Kbytes of SRAM memory. Is it enough? Well it depends on what project it’s gonna hold. If your project must deal with loads of data or run larger RTOS code you will definitely run out of RAM pretty soon. Atmega128 microcontroller has an external memory interface built in, which allows to expand RAM up to 64 Kbytes. With that you could do much more, isn’t it? To test things out I used Piconomic Atmega128 development board. Which has a XMEM interface header brought out. All we need is to make XMEM expansion board with some SRAM memory.

MEM expansion board with some SRAM memory for Atmega128

I’ve chosen standard 8Kx8 (8Kbytes) memory chip AS6C6264 from Aliance memory Inc. I could use 64Kx8 but this is what I had at the moment. To drive memory chip I’ve used 74HC573 non inverting latch. As you may know latch is used for pins that share same pins for address and data buses. In order to access SRAM contents we need to select 16 bit address that points to 8 bit data cell in chip. As we are using 8Kx8 memory chip we are going to use only 13Address lines. Microcontroller has dedicated pins for that:

  • AD[0..7] (PORTA pins) – multiplexed data and low order address pins;
  • A[8..15] (PORTC pins) – high order address pins;
  • ALE (PG2 pin) – address latch enable;
  • RD (PG1 pin) – inverted read strobe;
  • WR (PG0 pin) – inverted write strobe.

Microcontroller board runs at 7.3728MHz so standard 74HC series latch timing characteristics are fine – no special delays are needed. Here is the schematic;

Schematic: Adding external memory to Atmega128
Click to enlarge

Once board is ready it is time to test it attached to AT128mega board:

XMEM expansion board with some SRAM memory


Eagle files

You may have to register before you can post comments and get full access to forum.
User Name