Electronic – Reducing the memory address bus by adding banks

addressingcpumemory

If you are trying to control memory from a CPU, then if you use two banks instead of one, you can remove the first address line. If you use four banks, then you can also remove the second as well. Why is this?

Best Answer

I think W5VO's reply is a great description of a modern memory system but does not really describe Bank Switching.

You want bank switching when you have a narrow address bus (like 8- or 16-bit) and you want to add more memory. You can then use separate GPIO lines to switch memory chips just like W5VO wrote. You have to be careful because all your pointers are still 8-bit and the switching is manual so you can easily cause a mess.

This technique was/is popular in small micros, but also in 16-bit DOS (it was born on the 80286) and kind of in modern 32-bit processors to address more than 4GB of memory (but here the trick is done invisibly by the kernel and one program can still only see 4GB).

Related Topic