View Full Version : White Paper Discuss: Interrupts for Dummies
CD47-Bot
02-03-2004, 17:17
Thread created automatically to discuss a document in the White Papers.
Interrupts for Dummies (http://www.chiefdelphi.com/forums/papers.php?&action=single&paperid=272) by Daniel
jacob_dilles
02-03-2004, 17:17
this is an EXCLENT white paper. thanks for taking the time to put it together!
phrontist
31-12-2004, 21:20
this is an EXCLENT white paper. thanks for taking the time to put it together!
Arguably the best whitepaper on CD. This has really cleared up a lot of blurry areas for me that arose when reading the official docs.
prograid
10-01-2005, 00:09
Do you need to disable the interrupts if you want to access the variables changed by the interrupt service routine or is disabling only necessary when the variables are changed?
Thanks
Mark McLeod
10-01-2005, 09:07
Do you need to disable the interrupts if you want to access the variables changed by the interrupt service routine or is disabling only necessary when the variables are changed?
Thanks
If it's a one shot use like x = encoder count;
You don't have to disable the interrupts.
Caution: If you need to reference the variable several times like:
if (encoder count == 10)
x += encoder count
The value of encoder count the second time won't necessarily be the same as the first reference. Make it a habit to move any interrupt variable to a working variable if you plan on using it repeatedly (in a calculation too).
this is really useful, thanks! :D
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.