How to program 8051 for Hardware interrupt ?

Thread Starter

thar07

Joined Jan 3, 2015
71
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 ?
 

Papabravo

Joined Feb 24, 2006
21,159
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?
 

Thread Starter

thar07

Joined Jan 3, 2015
71
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?
Could you please give me a example program ?
 

Papabravo

Joined Feb 24, 2006
21,159
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.
 
Top