Discussion forum for the BasicX family of microcontroller chips.
|
I am writting code to read a magnetic strip on an id card for my university and am planning on saving the data to external EEProm. I have written the code and it works. However, it only will run one or two times. At the end of a few successful runs the BasicX stalls. I have guessed that the problem might be a RAM overload, but I have no idea if this is correct or if this is even the problem. Please, if anyone has had this type of problem and has found a solution let me know. Does anyone know of a way we can clear the RAM because we don't need the data that is saved on it, and I think it might be stalling the program. Thanks. BasicXBubba |
|
|
|
--- In , "basicxbubba" <basicxbubba@y...> wrote: > [...] At the end of a few successful runs the BasicX stalls. [...] Perhaps the I/O bearings need to be greased. ;) Seriously, though, depending on how complex your program is you may be the stack may be overwriting some of your variables. Also, it is possible that a coding or logic error is causing an array limit to be exceeded which could corrupt the stack or other data. There is no need to "clear RAM". If you want to re-use elements of an array, just start writing them anew. If you look at your .mpp file within the first 20 lines or so it will indicate "RAM allocated" and "Main stack size". What are those values? |
|
|
|
Our RAM allocated is 208 bytes and our main stack size is 193 bytes. Does this
help? thanks BasicXBubba Don Kinzer <> wrote: --- In , "basicxbubba" <basicxbubba@y...> wrote: > [...] At the end of a few successful runs the BasicX stalls. [...] Perhaps the I/O bearings need to be greased. ;) Seriously, though, depending on how complex your program is you may be the stack may be overwriting some of your variables. Also, it is possible that a coding or logic error is causing an array limit to be exceeded which could corrupt the stack or other data. There is no need to "clear RAM". If you want to re-use elements of an array, just start writing them anew. If you look at your .mpp file within the first 20 lines or so it will indicate "RAM allocated" and "Main stack size". What are those values? Yahoo! Groups SponsorADVERTISEMENT --------------------------------- Yahoo! Groups Links To --------------------------------- |