??? 10/17/04 09:15 Read: times |
#79439 - RE: hard- or software problem? Responding to: ???'s previous message |
You should look closely at how the interrupt routine handles the data items that are also being manipulated by the mainline program. One area of concern is the mainline program manipulating any variables over 8-bits that are also used by the interrupt. A second concern is the mainline code accessing any variables in a read and then modify and write back result manner where this same variable is used in the interrupt routine. The reason these items are of concern is that the mainline code could be in the midst of working with one of these variables and then get interrupted wherein the interrupt tries to work with the same variable that is in its invalid state.
Then of course there is also the often overlooked problem that people encounter when working with interrupts for the first time. That is that the interrupt routine changes the working environment of the mainline program in a way that is detrimental to the proper functioning of the mainline code. If an interrupt routine uses a register or PSW that is also used by the mainline then the interrupt routine MUST save those and make sure to restore them all to the same state/value they had before the interrupt started. Michael Karas |
Topic | Author | Date |
8052 newbie: int0 problems | 01/01/70 00:00 | |
RE: 8052 newbie: int0 problems | 01/01/70 00:00 | |
Pull-ups at P0 lines? | 01/01/70 00:00 | |
RE: layout / wiring | 01/01/70 00:00 | |
RE: layout / wiring | 01/01/70 00:00 | |
RE: layout / wiring | 01/01/70 00:00 | |
RE: layout / wiring | 01/01/70 00:00 | |
RE: layout / wiring | 01/01/70 00:00 | |
RE: 8052 newbie: int0 problems | 01/01/70 00:00 | |
Real name | 01/01/70 00:00 | |
RE: Real name | 01/01/70 00:00 | |
RE: 8052 newbie: int0 problems | 01/01/70 00:00 | |
RE: hard- or software problem? | 01/01/70 00:00 | |
RE: hard- or software problem? | 01/01/70 00:00 | |
RE: hard- or software problem? | 01/01/70 00:00 |