CR4 - The Engineer's Place for News and Discussion®

Previous in Forum: PLS CADD   Next in Forum: Unzip Files in VB Script
Close

Comments Format:






Close

Subscribe to Discussion:

CR4 allows you to "subscribe" to a discussion
so that you can be notified of new comments to
the discussion via email.

Close

Rating Vote:







10 comments
Power-User

Join Date: Nov 2010
Posts: 236

Internal RAM and ROM of the 8051

01/05/2011 3:17 PM

Wikipedia tells me that the Internal RAM of the 8051 is 128 bytes. But aren't the memory locations from 00 H to 7F H equal to 128 bits (and not bytes)?

Wikipedia also says the ROM is 4K bytes, could anyone explain how that value comes?

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act

Join Date: Aug 2006
Location: Gwalior, Madhya Pradesh, India
Posts: 3190
Good Answers: 30
#1

Re: Internal RAM and ROM of the 8051

01/06/2011 12:38 AM

They are Bytes in each location. Some of these can be addressed as 8 bits within each Byte.

__________________
Prof. (Dr.) Shyam, Managing Director for Advanced Sensor Research Organization. Gwalior, MP474020, India.
Register to Reply Score 1 for Good Answer
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 14943
Good Answers: 161
#2

Re: Internal RAM and ROM of the 8051

01/06/2011 8:28 AM

The 4K ROM is probably where the microcode is stored so that the processor can understand each byte of a program as it runs.

If there is ever found to be an error with a particular command, later versions can have an updated ROM to correct the fault. (Parts already made will be "stuck" with the fault!!)

The RAM can usually be extended by adding external chips......as can ROM if required.

__________________
"Better to remain silent and be thought a fool than to speak out and remove all doubt!"
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act

Join Date: Aug 2006
Location: Gwalior, Madhya Pradesh, India
Posts: 3190
Good Answers: 30
#3
In reply to #2

Re: Internal RAM and ROM of the 8051

01/06/2011 10:45 AM

yes, you are right Andy. Flash or ROM Memory is where mainly CODE and some permanent data can be stored and also you have Interrupt vectors for jump / call sub locations in ROM. RAM is where you store dynamic data and some I/O port outputs and variables for some internal registers. See the RAM table in your catalog.

It is worth for the beginners to go through details and use some training kit and see what is happening inside the Microcontroller for each code and one can debug each step. There are simulator programs also for this purpose that allow one to see inside core simply by software and no hardware is required.

Some help may be available at www.8052.com and www.keil.com and www.atmel.com

.

__________________
Prof. (Dr.) Shyam, Managing Director for Advanced Sensor Research Organization. Gwalior, MP474020, India.
Register to Reply
Power-User

Join Date: Nov 2010
Posts: 236
#4

Re: Internal RAM and ROM of the 8051

01/06/2011 2:09 PM

Oh thanks guys. I made a mistake by thinking each memory location was just one bit, its one byte. So 00 H to 7F H makes 128 bytes. And of course external locations from 0000 H to FFFF H makes 64 KB.

Thanks. =)

Register to Reply
Power-User

Join Date: Dec 2010
Posts: 473
Good Answers: 42
#5

Re: Internal RAM and ROM of the 8051

01/06/2011 2:17 PM

The 128 bit variables you are referring to are contained in the RAM bytes located at addresses 0x20 to 0x2F. This is part of the 128 bytes of internal ram at 0x00 to 0x7F.

The addresses at 0x80 to 0xff are SFRs (special function registers), also bytes.

(All this information was in that same Wikipedia entry, under "Memory Architecture", did you not read down that far?)

Rufus

Register to Reply Score 1 for Good Answer
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act

Join Date: Aug 2006
Location: Gwalior, Madhya Pradesh, India
Posts: 3190
Good Answers: 30
#6
In reply to #5

Re: Internal RAM and ROM of the 8051

01/07/2011 12:09 AM

Good answer.

__________________
Prof. (Dr.) Shyam, Managing Director for Advanced Sensor Research Organization. Gwalior, MP474020, India.
Register to Reply
Guru
Hobbies - HAM Radio - New Member

Join Date: Oct 2006
Location: Vancouver (not BC) Washington (not DC) US of A
Posts: 1225
Good Answers: 11
#7
In reply to #5

Re: Internal RAM and ROM of the 8051

01/08/2011 11:15 PM

What the x?

OK... in the old micro p's they had address space from 0000H to FFFFH. Where does this goofy x enter in? 256 byte blocks of memory (you select x)? I never did assembly work with Intel to any extent (and it has been a long long time ago).

Bill

Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act

Join Date: Aug 2006
Location: Gwalior, Madhya Pradesh, India
Posts: 3190
Good Answers: 30
#8
In reply to #7

Re: Internal RAM and ROM of the 8051

01/08/2011 11:27 PM

x is for number type HEX.

__________________
Prof. (Dr.) Shyam, Managing Director for Advanced Sensor Research Organization. Gwalior, MP474020, India.
Register to Reply
Guru
Hobbies - HAM Radio - New Member

Join Date: Oct 2006
Location: Vancouver (not BC) Washington (not DC) US of A
Posts: 1225
Good Answers: 11
#9
In reply to #8

Re: Internal RAM and ROM of the 8051

01/09/2011 1:53 AM

OK... I guess. I assume the x goes before any non-zero nibbles.

Thank you Shyam

Bill

Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act

Join Date: Aug 2006
Location: Gwalior, Madhya Pradesh, India
Posts: 3190
Good Answers: 30
#10
In reply to #9

Re: Internal RAM and ROM of the 8051

01/09/2011 3:46 AM

number 0 to 9 are same in decimal and HEX. problem starts after this number as digits become of different value in two systems. x is added for HEX digits. There may be some difference among compilers regarding representation. However ANSI C code is more or less uniform type.

__________________
Prof. (Dr.) Shyam, Managing Director for Advanced Sensor Research Organization. Gwalior, MP474020, India.
Register to Reply
Register to Reply 10 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
Copy to Clipboard

Users who posted comments:

Andy Germany (1); Jay_ (1); RufusVS (1); Sciesis2 (2); Shyam (5)

Previous in Forum: PLS CADD   Next in Forum: Unzip Files in VB Script

Advertisement