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.
Hi all,
I have a C51 application that requires the following operation which is close to a reset but it is not a reset:
1. when a bit is set in a register, call a function and return 2. when a bit is cleared in a register, exit the ISR and jump back to the main routine (the stack should be reset).
I use Keil C51 and uses the following method trying to achieve the aims but to no avail:
void isr(void) interrupt { if (register & bit) function1(); else #pragma asm ljmp 800H; // 800h=main routine address #pragma endasm }
I tried this routine but it seems that the code is stuck. Has anybody tried a similar implementation, or is there anything that I can do to implement such a scheme?
Thanks very much for your response and Best Regards.
William
http://www.keil.com/support/docs/307.htm