0
\$\begingroup\$

It's said the microcontroller AT89C51RC2 has 256 B RAM for data, 32 kB Flash for program, 1 kB XRAM and 2 kB BOOT ROM.

enter image description here

The RAM adrressing area is 00h to 0FFh, which takes all 256 B. SFR has adresses from 80h to 0FFh, which means 127 B. Now where, physically, this memory is?

enter image description here

\$\endgroup\$
2
\$\begingroup\$

The SFR space refers to physical device registers. It has 128 words worth of addresses, but not all of that is actually implemented. What is implemented is built in discrete flip flops that are directly connected to the peripherals and I/O ports. The SFRs sit on the device internal data bus. They are physically located all over the chip, local to the peripherals that they are connected to. This address space is also orthogonal to the RAM address space as it is accessed with different instructions and/or different addressing modes.

\$\endgroup\$
1
\$\begingroup\$

The information is right there at the bottom of the figure 8 you included. The text basically says that different instructions (actually, different addressing modes in the instructions) are used for accessing RAM vs. SFR space.

To more directly answer your question, the SFP space is in a different part of the chip from the RAM and there is effectively a switch driven by the instruction decoder to select which portion is addressed.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.