Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to estimate how much RAM in a microcontroller do I need?

Status
Not open for further replies.

aym_qunibi

Member level 4
Joined
Mar 5, 2005
Messages
77
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
1,932
how i can estimate that the ram in microcontroller is enough for my program?
 

enough ram

May be you should tell which microcontroller that you're referring to... :)
 

Re: enough ram

Hello

BTW, what compiler are you using ??
 

Re: enough ram

metal said:
Hello

BTW, what compiler are you using ??

If i use 8052 uC and i using uVision compiler how i going to know?

Thanks
 

Re: enough ram

Hi

I can't help you, cuz I never worked on uVision compiler, nor 8052.

Regards
 

Re: enough ram

Open your HEX code using any text editor and check where the end of your code is.
:1006B300C2ACE50A7008D29974E0F50AF50B04B4EC
:1006C300FF0274E0B50B06D2AC000206B3F50AC80C
:1006D300F6D2ACC8D0E0C8D0D022A7
This is an example of end of code in hex.
The information you are after is:
1006C3 ....
1006D3.....
so the end of code is close to 06D3h = 1747(decimal).
Regards,
IanP
 

Re: enough ram

hai

initially u can't predict the exact ram or rom needed
first approximately u chose the one controller to fit your requirements
 

enough ram

You yourself control the amount of RAM. RAM is used for 3 purposes, (a) Stack , (b) local data (c) your variables. Simple applications without too much sburoutine nesting or reeentrant functions dont require much stack space and 8052 is quite enough for them. A simple way is to compile a simple program and check the M51 file generated. It tells the exact RAM usage.
 

Re: enough ram

Let's clarify something:
Do you want to estimate the RAM usage while running your program, or do you want to estimate the size of program memory (Flash or Eprom) required for your progam code?
Regards,
IanP
 

Re: enough ram

Hi,

Ya, i want to estimate the size of program memory (Flash or Eprom) required for my progam code.

IanP said:
estimate the RAM usage while running your program
What you meant?

Thanks...
 

enough ram

When you build the project, the build window tells you exactly how much code space your program is taking. That is the size. What else do you want to know.
 

Re: enough ram

Hi,

Actually i don't know how to convert my C code to Hex file.... I am use uVision??

Thanks..
 

enough ram

If you have uV, you can follow the easy steps given in the tutorial to build a project. Inside the project properties, you can check the box "generate hex file". Then when you Build the project, you will have your hex file made.
uV comes with a good demonstration animation also. It is really quite easy to understand.
 

Re: enough ram

Hi,

What you mean inside the project, i wouldn't see the "generate hex file"?

Can you tech me step-by-step?
First after create a new_project then,
i choose the device after that i open a new_file (white paper) the next,
i write my C program (program is no error)......
then(how to generate hex file)......

Thanks...
 

enough ram

Follow the menu : Project -> Options for Target .... -> Output Tab -> Create Hex File (check box).

Once done, Menu : Project -> Build Target..... You have the Hex file
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top