retepsnikrep
Senior Member
Take the following line of code, which is in a repeating loop of other simple code until an interrupt is recieved.
CellV = RefVADC *25 / RefADC * 100 / 25
Will an Interrupt interrupt it, or will it complete the entrie line before interrupting?
I understand the general principle about interrupts being actioned after every command.
I wan't to use an interrupt, but I dont want the above calculation broken by the program jumping out of the line, as after the interrupt is generated my code sends the result of this to another program.
I know preserving the previous result from the last loop works, so the routine sends the earlier result to avoid potential errors but do I need to do this?
CellV = RefVADC *25 / RefADC * 100 / 25
Will an Interrupt interrupt it, or will it complete the entrie line before interrupting?
I understand the general principle about interrupts being actioned after every command.
I wan't to use an interrupt, but I dont want the above calculation broken by the program jumping out of the line, as after the interrupt is generated my code sends the result of this to another program.
I know preserving the previous result from the last loop works, so the routine sends the earlier result to avoid potential errors but do I need to do this?