EEPROM full
KellyH
Posts: 4
I'm writing a relatively simple program, and was not concerned with saving space (poor form, I know, but I'm new at this, and it's more of a means than and end), assuming I would have plenty of room. I was surprised when I found that my EEPROM was full. As I understand it, the amount of EEPROM I use depends on the number of program commands I use. Is that right? Are there any general ways to reduce the EEPROM size of a program?
Thanks,
Kell
Thanks,
Kell
Comments
I had no idea that the length of variable names should be a consideration, either (like I said, new at this).
There was also a particular subroutine that I wrote, then modified, then realized that there was a better way to implement, but was under pressure to get a functional product working and so I didn't make the changes I wanted to right away. So, I'm going back to fix that, and will shorten variable names. If that doesn't free up enough space, I will post again (with code).
Thank you!
Kell
Debug statements take up lots of room because the string to output to the screen has to be stored in EEPROM. By shortening the length of what you output to the screen you can save memory.
* Long variable names will increase your memory requirements if you use the '?' operator in a statement like "DEBUG DEC3 ? superLongVariableName"
Which·Stamp you are using?·You can optimize your EEPROM usage on the BS2e, BS2sx, BS2p, BS2pe, and BS2px by subdividing your program into smaller files and utilizing the 8 program slots. For more information view the [noparse][[/noparse]Compiler Directives] in the Help file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
························ Craig Eid
··········· Triad Research and Development
Electical Engineering Design and Consulting Services
··················· www.TriadRD.com