Common example is pressing on the key on the keyboard, which causes to the keyboard to send Interrupt to the microcontroller to read the information of the pressed key. The “request†for the microcontroller to “free itself†to execute the interrupt could come from several sources: In fact, the method of interrupt defines the option to transfer the information generated by internal or external systems inside the micro by them self! Once the system has finished the task imposed on it, the processor will be notified that it can access and receive the information and use it. Interrupt is “requesting" the processor to stop to perform the current program and to “make time†to execute a special code. Interrupt is the signal sent to the micro to mark the event that The main drawback of this method when writing program is waste of time of microcontroller, which needs to wait and check whether the new information has arrived. In fact we see that in the Polling method the external devices are not independent systems they depend on the microcontroller, and only the micro is entitled to obtain access to the information it needs. In the Polling method, the PIC microcontroller must "access by himself" the device and “ask†for the information it needs for processing. The user is the one who determines the time intervals in which micro “contacts†the device. Using this method, the microcontroller accesses at the exact time interval the external device, and gets the required information. This operation can be performed in two ways:Ī) The first method is the simple one - Polling: How does the processor know to get the required information from the external system? Many times it is also external systems, located outside the micro itself which are communicating with micro through control lines.Īn example of such a system is a digital thermometer, which is measure the temperature and at the end of the measurements transmitting the results to the PIC micro. the implementation of the external PIC interrupts (C program and a video)Ĭomputer systems include microcontroller, which includes.the settings of the requeried registers to work with PIC interrupts.In this tutorial we will study about the Polling and especially on the PIC Interrupt. PIC interrupt tutorial PIC interrupt tutorial: General BackgroundĬLICK here for a quick PIC interrupt tutorial
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |