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.
Hello, I have developed an application using the 8051 and c51, there is a external memory 93c46 which contains the control variables for the applcations, these variables are read at the start of the application and are used further in the application. The values read from the memory are stored in the global variables and are used in the different routiens for the control purpose These variable get corrupted in the middle of the application causing unpridictable results. How can i say these variable get Corrupted? There is a ruotien to update these variables. The value of variables are displayed on screen and can be changed, after all the values are scaned and the values are stored back in the memory and application runs with the updated variables. so if a variable gets corupted it is visible in the routien which updates these variables More over if we switch off the application after seeing the corrupted variables in the the updation routien, before saving the corrupted variables, then after switching on the variables are read from the external memory perfectely well and can be seen quite well in the updation routien I am using AT89c51 micro which means the global variables get corrupted, which gets displayed in the updation rouotien Any help will be highly appericiated Thanks in advance Kapil
The variable which gets corrupted are not at all used in the interrupt(timer interrupt)service routien That is totally irrelevant Which 7 lines of code while being executed can cause this problem? and WHY? is this a compiler bug or what? 7 lines in a program I fixed and NO it is not a compiler bug, it was missing stack control. About stack overflow i dont know? i will check. the major problem on my end is that i dont have an emulator and i havent seen this problem on the simulator. i am trying to see it set a breakpoint in the simulator at the deepest subroutine level you have. check SP. then set the bit that activates your heaviest interrupt and let it enter, then check sp. I think this might work as a check using the ineffective method of simulating. Erik