![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
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 |
|
|
|
|
|
|
(permalink) |
|
You can use 100% of RAM, FLASH (ROM) and EEPROM on any PIC.
|
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
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 |
|
|
|
|
|
|
(permalink) | |
|
Quote:
Mike. |
||
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| 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 |