memory map in sx48 with sx/b
Hi
Is thier a way to see how much memory a program is using and how much thier is left to program in a sx48 usinf SX/B??
My program is getting bigger and bigger and I'm still finding things I can do. So I'm programming and testing and compiling but I think at some point I will be stuck on memory. I'm now on 990 line's. They are not all code (I plase also comments in it and I think that is not compiles to the chip)
That is what I want to check now.
If the limit is reached. Can we add on memory by I2C???
Stef
·
Is thier a way to see how much memory a program is using and how much thier is left to program in a sx48 usinf SX/B??
My program is getting bigger and bigger and I'm still finding things I can do. So I'm programming and testing and compiling but I think at some point I will be stuck on memory. I'm now on 990 line's. They are not all code (I plase also comments in it and I think that is not compiles to the chip)
That is what I want to check now.
If the limit is reached. Can we add on memory by I2C???
Stef
·
Comments
I chek and see that is until D20 filled and from thier it is FFF. So it is untill FF8 adressed. That means I have used more than 2/3.
I can't add any programmemory you tell me. So what if it is full and my program is not finisched?
stef
· Then you optimize the code for space.
· Put anything that generates alot of code that is used more than once in a subroutine.
· Find ways to change the code to MAKE is able to be put into subroutines.
· Find other ways to do something that uses less code space.
· Use some assembly if you need to.
· I went though all of these when I was coding the SD Data Logger. In the end a start converting stuff to assembly just to save a couple instructions. It was that tight...
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Teacher: What is the difference between ignorance and apathy ?
Student: I don't know and I don't care
Teacher: Correct !
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
The definition line for this subroutine is:
Since I use these so much, I actually have them in external files so that I can put them into any program without copy-and-pasted. I've attached those files for you.
Look for any SX/B instruction that it time-associated, things like PAUSE, PAUSEUS, SERIN, SEROUT, etc. -- these are all good candidates for encapsulation into a subroutine or function to reduce code space.
Thanks a lot for this good advice. I will continue my program and look for things I can put in subroutines. The project wil be a translator for dome commands. We are neding this to stear diffrend types of domes (like Pelco, bosch, ....) with one code. The problem is that I have a lot of fix data (stored under DATA) to use. That I can't put in a sub. It is different and it needs to be thier. The checksum is a calculation and is already in a sub. The serial in and out is also already in a sub.
I 'm thinking. The program I can't put in extra mem (I2C connected). But the data (what is a lot) Can I put that in extra mem connected with I2C. Is it much slower then? That would free up a lot off space and the communication on I2C I can place in a sub.
Does anyone has a ic type to use and ore some examples?
stef
You cannot put program code externally, but if you have alot of data then you CAN put that in an external EEPROM and read it from there. That would be a good plan.
How many bytes of data do you have ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Teacher: What is the difference between ignorance and apathy ?
Student: I don't know and I don't care
Teacher: Correct !
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
I'm working with the 64K byte 24LC512 EEPROM today and have attached my routines (all tested and working) for you to use as you please.
Note: In my program I'm just using a single EE so the slave ID byte is a constant; to implement the suggestion above the slave ID would need to be a variable.
thanks a lot. I will continue the programm.
stef
into this --
Comparing this with using PAUSE·ate·up·the same amount of space (Device >> Run), $7E.· Maybe I'll realize more savings with more PAUSEs.· I'll try it with some other stuff (like my 5x7 Demo·programs.)
Update -- In one program where I had 4 PAUSEs, I went from $1CF down to $1C4 (cutting out·$0B, that's 1110.)
Post Edited (PJ Allen) : 7/27/2007 7:01:15 PM GMT