0
\$\begingroup\$

... since using 7-bit in 8-bit address bus wastes one wire.

In 8051 there is a 8-bit address bus for internal RAM out of which we just use 7 wires making it addressable to just 128 byte locations, why not use all 8 wires to make it accessible to 256 bytes?

SamGibson
18.5k5 gold badges42 silver badges65 bronze badges
asked Jan 9, 2022 at 10:17
\$\endgroup\$
2
  • \$\begingroup\$ Well, perhaps 7 wires for address, 1 wire for control (read/write, for example, similar to I2C which has 7 bits for device addresses, 1 bit for read/write). Another use of the single bit is for enable/disable "banks" of 128 bytes. \$\endgroup\$ Commented Jan 9, 2022 at 10:36
  • \$\begingroup\$ The 8051 was also a pretty early microcontroller; minimal RAM may have been a cost-cutting measure (though I have no actual evidence of this, merely a guess). \$\endgroup\$ Commented Jan 9, 2022 at 14:49

2 Answers 2

5
\$\begingroup\$

There are 8051 compatibles with 256 bytes of RAM.

Original 8051 had 128 bytes because it was enough and the other 128 bytes are reserved for special function registers, so one address bit defines if you want to use RAM or SFS.

The chips with 256 bytes of RAM can only directly access 128 bytes because the other half is reserved for SFRs. The second half of RAM can only be accessed indirectly.

answered Jan 9, 2022 at 10:59
\$\endgroup\$
1
  • \$\begingroup\$ Most often, the second half of RAM is used for the stack. \$\endgroup\$ Commented Jan 9, 2022 at 12:09
0
\$\begingroup\$

When processing MOVX instruction, or a MOVC instruction with an address over 0FFFh, the 8051 outputs an address which an outside memory chip can process as it sees fit, allowing direct access of up to 64K of data and 60K of externally-stored code if a sufficient amount of external memory is connected. When processing any instruction other than MOVC or MOVX that uses memory, however, the part needs to be able to satisfy the request with memory that can be accessed without using the external bus, which in turn means that it needs to use memory on the same silicon chip as the rest of the CPU and I/O circuitry. Making the RAM only use 128 of the 256 possible addresses also means that it only occupies half as much space on the chip as it would if it were larger.

answered Jul 3, 2024 at 18:36
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.