Interrupts in 8051 8051 Micro-controller by Ravinder Nath Rajotiya - December 3, 2021December 3, 20210 Interrupts in 8051 What is an Interrupt: It is a requesting mechanism for the peripherals to make the microcontroller interrupt the currently executing program and run the program to service the request. The program that is run upon the interrupt is called an ISR (interrupt service routine) Types of Interrupts in 8051 There are five different sources of interrupts A real life example - Before going to sleep, you set the timer. Then forget what the timer does, and go for sleep. When the timer finishes the counting, it alarms and interrupts you from sleep. You then wake and starts doing your routine. sources of interrupt in 8051 are: Timer-0: Timer-0 interrupts Timer-1: Timer-1 interrupts Serial Rx/Tx INT0 INT1 All interrupts in 8051 are vectored interrupts Interrupt
Branch Type Instructions 8086 8086 Microprocessor by Ravinder Nath Rajotiya - December 14, 2020May 10, 20210 Branch Instruction: The branch instruction is used to transfer the control of the program to a new address. This branch can be Conditional or Unconditional. Once the branch is taken the execution of instructions will take place from this new address called branch address. Usually the Conditional branch is taken after the ADD, SUB, INC, DEC and the instructions used to implement the LOOP. When these types of instructions are executed, the CS and IP registers get loaded with new values of CS and IP corresponding to the location where a branch is required. The branch instruction can be one of the following types. Unconditional Jump instructions: JMP, CALL, RET, INT N, INTO, IRET, LOOP, Conditional Jump instructions: JA/JNBE, JAE/JNB, JB/JNAE, JC, JNC, JE /JZ, JNE