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.
But are you aware of the big difference involved about integer promotion? Do you have integer promotion turned on or off in C51?
Sorry, I am not aware of integer promotion, and if there is an option for the same how do i use it?
integer promotion is defined in the C standard. It is behavior that must be respected by all C compilers (at least, the not-hacked ones...!)
alright if c51 has a option to turn on/off integer propagation, what section of user guide should i refer for the same?
if c51 has an option for integer propagation how do i turn it on?
Have you tried Google?
For example using the search words "keil c51 integer promotion"?
That should tell you: - what integer promotion is. - that Keil C51 can turn on/off integer promotion - how to turn on/off integer promotion - sample generated code with integer promotion active/inactive