Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 28th March 2008, 02:04 PM   (permalink)
Default ROM & RAM inside pic

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
kimsiang85 is offline  
Reply With Quote
Old 28th March 2008, 02:27 PM   (permalink)
Default

You can use 100% of RAM, FLASH (ROM) and EEPROM on any PIC.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Reply With Quote
Old 28th March 2008, 02:30 PM   (permalink)
Default

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.
Pommie is offline  
Reply With Quote
Old 28th March 2008, 05:24 PM   (permalink)
Default

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
__________________
If it is broken, let's fix it.
If it is working, let's make it better.
NightFalcon90909 is offline  
Reply With Quote
Old 29th March 2008, 03:21 AM   (permalink)
Default

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 by donniedj; 30th March 2008 at 05:13 PM.
donniedj is offline  
Reply With Quote
Old 3rd April 2008, 01:56 PM   (permalink)
Default 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 is offline  
Reply With Quote
Old 3rd April 2008, 01:59 PM   (permalink)
Default

Quote:
Originally Posted by kimsiang85
i am rushing for my final year project and tomorrow i need to go out for presentation.
Good luck, hope everything goes well.

Mike.
Pommie is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Quik PIC Programming kit Krumlink General Electronics Chat 5 27th January 2008 11:27 PM
Capturing and reproducing audio with a PIC Fred.Amoson Micro Controllers 14 14th December 2007 08:21 PM
Problems switchin relay with PIC Andy1845c General Electronics Chat 5 17th November 2007 06:13 PM
High ADC sampling rate PIC, 18F needed? bananasiong Micro Controllers 24 28th October 2007 12:13 PM
Four PIC with One LCD.. meera83 Micro Controllers 13 20th September 2007 06:40 AM



All times are GMT. The time now is 11:35 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.