This page was last updated on March 13th, 2020(UTC) and it is currently May 30th, 2023(UTC).
That means this page is 3 years, 78 days, 5 hours, 27 minutes and 23 seconds old. Please keep that in mind.
19 - IRQs
To fix the problems associated with varying clock rates for different hardware, we have something called "interrupts." Basically, a given CPU takes code in from RAM or EEPROM (varies per processor) and stops, waits, or generally starts working on another task. This much is entirely under your control as a programmer for many CPUs. Whenever a connected piece of equipment wants the CPU's attention, it will set to "true" one of the pins that the CPU is dedicated to reading. The CPU will then change the "instruction pointer" to a specific address of RAM or EEPROM in response to this. As a programmer, you would write instructions that are meant to handle the interruption (more on this later). The CPU will automatically return to whatever it was doing before the interrupt occured in response to a specific instruction that would tell it to do so, which will probably grab the previous address from RAM or a dedicated register.
Get your own web kitty here!
©Copyright 2010-2023. All rights reserved.