This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8051f020 Inrerrupt table or fromal parameter list

I am writing a ADC0 ISR for 8051f020. But i dont know the interrupt no. for ADC0 Interrupt(AD0INT). Hence i need a interrupt vector table where interrupt nos. may be listed. I am unable to find it on net and have read datasheet but could not find it. I cant poll the interrupt.

Kindly help.

Parents Reply Children
  • I have added this in header file (main.h)

    //-----------------------------------------------------------------------------
    // Interrupt Priorities
    //-----------------------------------------------------------------------------
    
    #define IE0_VECTOR              0     // External Interrupt 0
    #define TF0_VECTOR              1     // Timer0 Overflow
    #define IE1_VECTOR              2     // External Interrupt 1
    #define TF1_VECTOR              3     // Timer1 Overflow
    #define UART0_VECTOR    4     // Serial Port UART0
    #define TF2_VECTOR              5     // Timer2 Overflow
    #define SPIF_VECTOR             6     // SPI0 Interface
    #define SI_VECTOR               7     // SMBus0 Interface
    #define AD0WINT_VECTOR  8     // ADC0 Window Comparison
    #define CF_VECTOR               9     // PCA0 Peripheral
    #define CP0FIF_VECTOR   10    // Comparator0 Falling Edge
    #define CP0RIF_VECTOR   11    // Comparator0 Rising Edge
    #define CP1FIF_VECTOR   12    // Comparator1 Falling Edge
    #define CP1RIF_VECTOR   13    // Comparator1 Rising Edge
    #define TF3_VECTOR              14    // Timer3 Overflow
    #define AD0INT_VECTOR   15    // ADC0 End Of Conversion
    #define TF4_VECTOR              16    // Timer4 Overflow
    #define AD1INT_VECTOR   17    // ADC1 End Of Conversion
    #define IE6_VECTOR              18    // External Interrupt 6
    #define IE7_VECTOR              19    // External Interrupt 7
    #define UART1_VECTOR    20    // Serial Port UART1
    #define XTLVLD_VECTOR   21    // External Crystal Oscillator Ready
    

    Dejan,
    Thank you for pointing out.

    And Sorry guys, for not searching the datasheet properly.

  • As already noted, they are very bad names!!

    Your definitions are interrupt Numbers - they are not vectors!!

  • From where can i get the list of this vectors???

  • You don't actually need the list of vectors; you just need to rename your constants to reflect what they actually are - interrupt numbers!!

    However, for completeness, see the link which I posted on 5-Oct-2012 at 18:56 GMT...

  • on page:
    http://www.keil.com/dd/chip/3312.htm
    you will find all about C8051F020
    and long datasheet is there!
    http://www.keil.com/dd/docs/datashts/silabs/c8051f02x.pdf

    on page 117 are all interrupts with vectors (starting absolute addres of interrupt) and interupt numbers(=Priority order)!