Serial Interrupt Programming In 8051 Microcontroller
Interrupts in 8051 microcontroller are more desirable to reduce the regular status checking of interfaced or inbuilt devices as in the. Serial Interrupt Programming. SECTION 11.4: PROGRAMMING THE SERIAL COMMUNICATION INTERRUPT In Chapter 10 we studied the serial communication of the 8051. All examples in that chapter used the. 8051 MICROCONTROLLER AND ITS PROGRAMMING. For low level triggered external interrupt as well as for serial interrupt, the. 8051 Microcontroller Program.
As you may recall from Chapter 10, TI (transfer interrupt) is raised when the last bit of the framed data, the stop bit, is transferred, indicating that the SBUF register is ready to transfer the next byte. RI (received interrupt), is raised when the entire frame of data, including the stop bit, is received. In other words, when the SBUF register has a byte, RI is raised to indicate that the received byte needs to be picked up before it is lost (overrun) by new incoming serial data. As far as serial communication is concerned, all the above concepts apply equally when using either polling or an interrupt. The only difference is in how the serial communication needs are served. In the polling method, we wait for the flag (TI or RI) to be raised; while we wait we cannot do anything else.
In the interrupt method, we are notified when the 8051 has received a byte, or is ready to send the next byte; we can do other things while the serial communication needs are served. Use of serial COM in the 8051 In the vast majority of applications, the serial interrupt is used mainly for receiving data and is never used for sending data serially. This is like receiving a telephone call, where we need a ring to be notified. If we need to make a phone call there are other ways to remind ourselves and so no need for ringing. In receiving the phone call, however, we must respond immediately no matter what we are doing or we will miss the call. Similarly, we use the serial interrupt to receive incoming data so that it is not lost.
Look at Example 11-9. Driver Extractor V1.0.
Give More Feedback
When answering a question please:. Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome. Don't tell someone to read the manual. Chances are they have and don't get it.
Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.
Comments are closed.