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 i m using Atmel At89S52 Microcontroller in my banking project.I wanted to process the INT0 interrupt.
On my hardware platform i can see on the oscilloscope that logic 0 is coming on the INT0 pin.
What is linker's role in this inter-banking mechanism.
I m calling this routine from bank 3.so my function definition will be like as given below.
void Interrupt0(void) interrupt 0 using 3
but i m getting any results from this.
Kindly reply me on this....
"I m calling this routine from bank 3"
You can't call an interrupt service routine! http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm
Note that ISRs must be located in the Common Area: http://www.keil.com/support/man/docs/bl51/bl51_bk_commonarea.htm
Note that "using 3" refers to the 8051's Register banks - it has nothing to do with code banking! http://www.keil.com/support/man/docs/c51/c51_le_regbankspec.htm
Hi...
"ISRs must be located in the Common Area" :--> Yes my ISR is located in common Area.
"using 3" refers to the 8051's Register banks" :--> Could you please clearify this statement.
What will happen if i m not specifying the Register bank.It is necessary to specify?
You can have ISRs use a different register bank than the rest of the program. This will speed up the ISRs, since the registers do not have to be saved on the stack if the ISR switches to a different register bank.
On the downside, using more than one register bank decreases the amount of data memory, since the register banks are part of the data memory space.
Whether or not it is necessary to specify depends on your application. If your interrupt service routines can tolerate a few extra cycles of latency for saving a few registers, it may not be necessary to give ISRs their own register bank. If you need to minimize ISR latency, then giving ISRs their own register bank is what you need to do.
if EA=0(IE.7),then none of the interrupts can be processed.Right? But in my code,in Main function ,when i do the EA=1,then microcontroller gets reset.
and if i comment this statement then code works fine.
why it is happening?
My first guess would be that one or more of your ISRs contain bugs.
Does it get reset immediately, or after a while?
If you have set up a watchdog, and then don't service it, the watchdog can reset the chip.