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.
I have an interrupt handler where I save several strings of data into RAM. Using strcpy or strncpy works just fine when I had less than 64K RAM on my board. We have moved to a system that has 128K RAM so I have had to write a subroutine that does the work to figure out which XDATA bank to write the data. (We are using P1.6 as the A16 address line.) The subroutine works just fine in all of the places I use it within my code except from within the interrupt handler. Ideas? Is calling subroutines within an interrupt handler somehow forbidden? Do I have to use some directive to get this to work? Any and all suggestions welcome!
"When this code runs outside of the interrupt handler the bufaddr is correct but when called from the interrupt handler it is calculated wrong" are you using the same routine inside and outside the interrupt handler, That's a nono unless you have spent days making sure the routine is absolutotally reentrant. Erik
You raise a good point but that isn't my problem. I am only entering the interrupt handler once. Look at one of my later posts on this subject and you will see that there seems to be a problem in doing a math calculation on unsigned long integers that is messing me up.