Menu

How to use aditional ext. interrupts(80c535)?

Stevie B
2003-03-21
2003-03-21
  • Stevie B

    Stevie B - 2003-03-21

    Hi all,

    first, I must say Thanks for this good Software. I'm a Linux only User, and SDCC was the reason to starting again in 8051 development.

    How is it possible to use the 80c535 ints? OK int0 and int1 are no problem, but there is no reference in the Docs(3.8 Interrupts) how can I use more ints. I have tested to define funktions like "void ext_int2(void) interrupt 5" but the Jumpin adress in the hex file after compile is not correct.

    80c535 Interrupt Adresses:
    IEX2 0x4BH, IEX3 0x53H, IEX4 0x5BH, IEX5 0x63H, IEX6 0x6BH

    Stefan

     
    • Bernhard Held

      Bernhard Held - 2003-03-21

      The isr address is calculated by
      isr_adr = (int_num * 8) + 3;

      The other way round:
      int_num = (isr_adr - 3) / 8;
      0x4b -> 9

      That's exactly what you will find in mcs51reg.h, if you look for IEX2_VECTOR.

       

Log in to post a comment.

MongoDB Logo MongoDB