Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/04/03 07:12
Read: times


 
#52042 - Paulmon memory problem
Hi guys, I have coded a 16-bit calculator using the paulmon 8051 board. In the beginning of my code I declare many variables I need into different memory locations of the board. For instance, I have a variable called keynum used to track the number of digits entered. I declare it this way: .equ keynum, 0x0040. The problem I am having is that it seems like I may be declaring my variables in reserved or wrong memory spots, because at certain points when it is running, it will arbitrarily jump to one of my error calls and display a message that it shouldn't need to at that point. For instance, I have an error check that checks and makes sure the number entered is not longer than 5-digits. Everything works fine in general, but when I do 2 arithemtic operations in a row that involve 5-digits(the max being 65,535), the next time I try to enter a number in, my length error message comes up, and my paulmon monitor restarts. It does the same thing for numbers less than 5-digits, it just is able to go through more than 2 operations before it does so. It doesn't seem to be clearing my keynum properly, even though after each operation is complete I call a routine to clear all of my variables. Does this have to do with how and where I am declaring my variables? I have changed up the memory addresses of my variables many times, as well as used the register banks instead of the variables, but it still causes similar problems. I have checked the paulmon memory map, and it seems to me like I am declaring them in proper spots. Thanks for the help.

List of 13 messages in thread
TopicAuthorDate
Paulmon memory problem            01/01/70 00:00      
   RE: Paulmon memory problem            01/01/70 00:00      
      RE: Paulmon memory problem            01/01/70 00:00      
   RE: Paulmon memory problem            01/01/70 00:00      
      RE: Paulmon memory problem            01/01/70 00:00      
         RE: Paulmon memory problem            01/01/70 00:00      
      RE: Paulmon memory problem            01/01/70 00:00      
         RE: Paulmon memory problem            01/01/70 00:00      
            RE: Paulmon memory problem            01/01/70 00:00      
               Micro Controller            01/01/70 00:00      
                  RE: Micro Controller            01/01/70 00:00      
               Micro            01/01/70 00:00      
                  RE: Micro            01/01/70 00:00      

Back to Subject List