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

8051 External interrupts

OK, I'm a novice with the 8051. How do you map a port pin to an external interrupt (or visa versa, say External interrupt 2)?

I'm assuming that there are no dedicated pins for each of the seven Ex. interrupts on my chip and they have to be assigned somehow to a pin/bit on a specific port. Is this assumption correct?

-Michael

Parents
  • 7 external interrupts on an 8051? Wow, which part (Vendor and ID) are you using. The most I've seen is three.

    Anyhow, they are hardwired on the standard 8051's. If you want your A/D to signal end-of-convert on /int0 then connect it to /int0 and install your LJMP + A/D ISR address (little endian of course) at the /int0 interrupt vector location.

    From Intel's MCS-51 User's Manual:

    Vector     Vector Address
    RESET      0000H
    IEO        OO03H <-- External Intr 0
    TFO        OOOBH
    IE1        O013H
    TF1        OOIBH
    RI & TI    O023H
    TF2 & EXF2 O02BH
    

    - Mark

Reply
  • 7 external interrupts on an 8051? Wow, which part (Vendor and ID) are you using. The most I've seen is three.

    Anyhow, they are hardwired on the standard 8051's. If you want your A/D to signal end-of-convert on /int0 then connect it to /int0 and install your LJMP + A/D ISR address (little endian of course) at the /int0 interrupt vector location.

    From Intel's MCS-51 User's Manual:

    Vector     Vector Address
    RESET      0000H
    IEO        OO03H <-- External Intr 0
    TFO        OOOBH
    IE1        O013H
    TF1        OOIBH
    RI & TI    O023H
    TF2 & EXF2 O02BH
    

    - Mark

Children