I need to add over 20 kBytes of RAM to the small device built around ATMega8. Moreover I'm interested to research whether I can substitute it with ATtiny2313. The goal is roughly speaking to store some fast arriving data there before serving them out through serial interface...
I thought of 62256 chips, but with them I need 15 address lines and 8 data lines - somewhat more than I can spare with any of these two MCUs. Meanwhile the matter is to find the solution with smallest (cheapest) MCU possible, so I'm not ready to switch to some ATMega16 or 32 which, I think, will do the trick. I also have found serial SRAM from Microchip, but it seems the speed will be not sufficient for me...
So I'm thinking of using two (?) octal latches - but I'm afraid I'm reinventing the wheel and here could be easier solution. That's why I'm here. This is my current idea:
- I feed the high and low bytes of the address from outputs of two octal latches;
- I wire 8 pins (say, PB0..PB7) to both latches and to 8 data lines;
- Now I need two more pins to control latches and another two for WE and OE of the SRAM chip.
And here are my questions:
- are two latches enough, is it correct I need no latches on data lines?
- will 74hct373 be a good choice for latches?
- is it ok to slightly swap address lines for high byte (i.e. instead of order A8, A9, A10, A11, A12, A13, A14 wire them as A8, A9, A11, A10, A14, A13, A12 for example to simplify routing)?
- perhaps there is another solution (besides larger MCU, latches or serial SRAM) I've missed?