sir, i would like to know what are the functions of different "Interrupt Vectors"? say for example: void External0 () interrupt 0; void External1 () interrupt 2; void ADCR () interrupt 6;
- as u can see , diffferent interrupts has been called for different functions . so my question is what are the applications of these various interrupts and their functionality? .....please reply with reference to ADuC845(8051 core), using c51 compiler. .....if possible please post the detail functions of all the 0-31 interrupts of c51 compiler.....
They are clearly stated in the Manual:
http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm
The interrupt number tells the compiler which vector location to use; your specific chip documentation will tell you what functions it attaches to each vector.
John gave an excellent reason for why Keil picked up the interrupt number idea, so no blame to Keil here.
But is it not interesting how many misunderstandings could have been avoided over the years if
void ISREI0 interrupt 0 would have been void ISREI0 vector 003h
Erik
Yes - the "interrupt number" does seem a rather unnecessary level of indirection!
In fact, I think that Tasking does have the option of specifying either an interrupt number, or the absolute vector address.