We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
how to organize memory to avoid erratic behaivour of code during runtime?
I am accumulating input, averaging it and then calculating address from input to fetch data from multi-dimensional array in code memory. Input is given to a particular channel, i hav given selection for type of sensor at input. For a particular selection of sensor, I need to process the averaged input and fetch data from code array. My code is logically correct but it is skipped during runtime after input is varied beyond a particular value, so the display freezes, but program resumes if i change the sensor type. This erratic behaivour is observed for a particular selection of sensor type.
OR is the behaviour related to stack?
I do agree that processor types are different, and there is no point in saying that the code works on TurboC. But it is also true that numeric data type was selected taking care of the fact that the input does not overflow the bound of the data type and further the processing operation on input do not produce results exceeding the boundary of the data type. Now regarding the boundary of the array, if operations on the input produce results that exceed the boundary of the array, then the problem is simple. I'll hav to look a bit carefully, Thnx anyways.