[Basic introduction]
I thought I should make a short post on how to calculate how many lines are in your data bus or address bus and conclusively the maximum RAM which can be connected to your system.
The lines in your data bus are directly proportional to the system's word size in bits.
In simpler terms the standard examples would be laptops having 32-bit or 64-bit word sizes, they would respectively have 32 and 64 lines in the data bus.
Therefore "n-bit system" has n data lines.
There is no standard calculation to find the address lines in a microcontroller/microprocessor. There are a few standard architectures I shall disclose here.
Code:
mpu/cpu address lines
M68hc1* 16
16-bit Intel 8086 20
80286 MPU 24
32-bit 80386 32
80486 MPUs 32
64-bit Pentium MPU 32
The maximum RAM that ca be connected to the system depends upon the type of wiring present, yet here is a standard outlook on such.
the maximum data each memory location can store is the system's word size. Be warned, usually not all address or lines are connected but for this example lets assume all address or data lines are connected to one RAM chip.
The maximum quantity of addresses that can be accessed by the system is y where x is the number of address lines in the system.
so assuming x is 32, y becomes 4294967296.
Code:
assuming the system has 32 data lines this means the maximum RAM in bits that can be stored by your system is:
32*4294967296 = 137438953472b
137438953472 bits = 17179869184 Bytes
17179869184 Bytes = 16777216 KB
16777216 KB = 16384 MB
16384 MB = 16GB
Keep in mind this work is theoretical and this amount is limited due to the wiring and in most cases by the Operating System.