Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ROM & RAM inside pic

Status
Not open for further replies.

kimsiang85

New Member
i am using pic16f877a for my final year project.
i have written some coding for the microcontroller and it used around 22% of RAM and 76% of ROM.

why the usage of the RAM and ROM have such large difference??
can i use the capacity of RAM and ROM till maximum?
will it slow down the performance of PIC or spoil the PIC??
do pic16f877a have the limit like for example just can use till 90% of RAM and ROM

so, i hope you all can give me some advice regarding on this.
thanks
 
You must have a lot of code to fill 76% of a 877. If you post your code we can probably suggest ways to make it more compact.

Mike.
 
On a PIC, ROM is the memory that holds the code. RAM holds data collected from the environment that the robot collects and holds. I must say I am astonished that you are filling so much of your memory up with an 877... I would definitely like to see... I would be very surprised if it couldn't be trimmed a bit :)
 
kimsiang85:
You should know that a microcontroller is not a serial access device like a cassette tape. You can easily fill the entire code space by placing all your code at the end of ROM and filling the upper locations with 0's, F's and such. Just because code is at the end of address space does not make it slow because it can be accessed is the same time as the very first byte of code, a.k.a. random access.

What impacts the PIC speed is the techniques of excessively using macros, calling tables, and moving bulks of RAM using hard coded labels as opposed to indirect addressing, and placing faith in compilers.
 
Last edited:
rom and ram

sorry for late reply.
i am rushing for my final year project and tomorrow i need to go out for presentation.
back to the topic
there are many redundant coding for my code.
i have reduce many of them and now i get 20-30% for rom and ram
thanks for all your advice
 
kimsiang85 said:
i am rushing for my final year project and tomorrow i need to go out for presentation.

Good luck, hope everything goes well.

Mike.
 
Status
Not open for further replies.

Latest threads

Back
Top