In the getting started Document(GS51.pdf) under Interrupt Service Routines they have given 31 interrupt out of which only 2 are external interrupt(correct me if i am wrong).I am little confused regarding the other interrupts as in how to use them correctly. How are these interrupts generated? Are these interrupts given by the RTOS?(RTX51)? can somebody please explain?
i8051 microcontroller consists of the following things: 1. CPU 2. Many different hardware modules, such as timers, ADC, comparators etc... 3. Memory (RAM, programmable ROM) All of the interrupts generated by some hardware modules (and, in rare cases, by CPU itself). There is interrupt for timer, interrupt for two external pins, interrupt for ADC, interrupt for PCA, MAC... Read the datesheet for concrete MCU you are using.
"Read the datesheet for concrete MCU you are using." Many datasheets for modern 8051 derivatives assume that you know the basics - so they only tell you the specific details relevant to the particular chip. For the basics, you need to read the documents commonly referred to as "the bible" for the 8051: Chapter 1 - 80C51 Family Architecture: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_ARCH_1.pdf Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf Chapter 3 - 80C51 Family Hardware Description: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_HARDWARE_1.pdf