How to program 8051 for Hardware interrupt ?

Discussion in 'Embedded Systems and Microcontrollers' started by thar07, Feb 24, 2015.

  1. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    What are the basic steps to program 8051 for hardware interrupt, like a emergency switch which is connected to INTo pin.
    what are basic command line for above the program ?
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,144
    1,791
    You only need to configure the interrupts for level mode or edge trigger mode. Then you have to put a link to the service routine at a fixed address in low memory which is given in the datasheet. Then you have to choose high or low priority. Now you enable the interrupt and turn on the global interrupt enable with an EI instruction. Is that what you were looking for?
     
  3. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    Could you please give me a example program ?
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,144
    1,791
    Off the top of my head, I can't do that since my reference materials and source libraries are in the land of snow and ice whilst I am in the land of sunshine. You too can find what you need in the excellent data sheets. Work hard quickly you must.
     
Loading...