View Single Post
  #13   Spotlight this post!  
Unread 21-12-2003, 22:37
WizardOfAz's Avatar
WizardOfAz WizardOfAz is offline
Lead Mentor
AKA: Bill Bennett
FRC #1011 (CRUSH)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Tucson, AZ
Posts: 101
WizardOfAz will become famous soon enough
Send a message via AIM to WizardOfAz
Re: read/write EEPROM on 18F8520

Program rom is 32k. This is all the all the program you write, plus any data you declare as rom, plus any library code you link in (in the default code, this is clib.lib and 18f8520user.lib). The default framework takes about 8k, so if you don't change that, you've got about 24k for your program and rom data.

The program rom usage can be examined in the .map file produced after you do a build. It's not real nice to read, but look for the lines after "program memory usage" for a simple summary of how much you're using.

Your non-rom variables go in the 1800 bytes of ram. I don't see any nice summary of total usage for this, but look at the lines for "DATA". I also haven't figured out why the number is 1800, the chip has 2048 bytes. Maybe what they're saying is library code needs 200 bytes, and there's 1800 bytes left. Not sure.

The EEPROM is 1024 bytes, and usage won't show up in the link map, since the addresses are all generated at run time. The linker doesn't know anything about this. Your program has to determined what is stored at 0, what at 1, and so on.

Bill