External Interrupts on 8051 - Questions & Answers

  • Thread starter soul
  • Start date
In summary, the speaker is confused about external interrupts in their microcontroller course and asks for clarification on how to remove low level situations in assembly and how edge-triggered interrupts work. They are also open to any additional information on the topic. Another participant suggests referring to the databook and app notes for more clarity. The speaker thanks them for their help.
  • #1
soul
62
0
Hi eveyone,
I am taking a course about microcontrollers and 8051 family and now I am so confused about the external interrupts. Therefore, I have some questions to ask. First of all, as I know we need to remove the low level situation before the RETI instruction is executed. But how can we do this in assembly? Can anyone put some sort of code to make it clear?
Second one, how does edge-triggered interrupt work?
These are the basic questions that I want to learn. However, further information about the external interrupts are welcome.
 
Engineering news on Phys.org
  • #2
Isn't this covered in the databook and app notes? It's been a long time since I wrote assembly for an 8051, but the documentation was pretty clear back then. Can you post a link to the databook for the 8051 variant you are using, and a link to an app note about using interrupts with it?
 
  • #3
berkeman said:
Isn't this covered in the databook and app notes? It's been a long time since I wrote assembly for an 8051, but the documentation was pretty clear back then. Can you post a link to the databook for the 8051 variant you are using, and a link to an app note about using interrupts with it?

You are right berkeman, it is covered. I haven't understood this concept from my textbook but then I did what you said and the things that I didn't understand is clear now. Thanks for your help.
 

FAQ: External Interrupts on 8051 - Questions & Answers

What is an external interrupt on 8051?

An external interrupt on 8051 is a signal from an external device that interrupts the normal execution of the microcontroller, allowing it to respond to the external event. This allows for the microcontroller to handle time-sensitive tasks or respond to real-time events.

How many external interrupts are available on 8051?

There are two external interrupts available on 8051, called INT0 and INT1. These can be configured to be triggered by either a falling edge or a low level on the corresponding external pin.

How can I enable an external interrupt on 8051?

To enable an external interrupt on 8051, you must first set the appropriate bit in the interrupt enable register (IE). Then, you must configure the appropriate external pin as an input and set the interrupt trigger mode (edge or level). Finally, you must write the interrupt service routine (ISR) to handle the interrupt when it occurs.

What is the difference between edge-triggered and level-triggered external interrupts?

Edge-triggered external interrupts are triggered by a change in the signal level on the external pin, either from high to low (falling edge) or from low to high (rising edge). Level-triggered external interrupts are triggered when the signal level on the external pin is continuously at a certain level, either high or low. The trigger mode can be selected when enabling the interrupt on 8051.

Can I use external interrupts on 8051 to wake up the microcontroller from sleep mode?

Yes, external interrupts can be used to wake up the microcontroller from sleep mode. However, the microcontroller must be configured to allow external interrupts to wake it up from sleep mode. This can be done by setting the appropriate bit in the power control register (PCON).

Back
Top