Society of Robots - Robot Forum
Software => Software => Topic started by: superchiku on March 31, 2008, 01:40:23 PM
-
hey all ,
i have made 3 bots so far but i have never used interrupts of any kind ,
i would like to know how would the interrupt be different from normal execution and how do they work also i want to know that suppose iam using 3 adc channels so how do i store the values from each channel after a conversion in different variables using interrupts using an atmega16
oh yes after storing the values, iam gonna use them for normal comparision and giving commands to my bot .
-
An interrupt is exactly that - an interrupt in your code to run other code.
So basically you set up an interrupt to trigger when an event occurs - such as a timer count (timer interrupt) or a digital port goes high (hardware interrupt).
When the interrupt is triggered it stops the code that is running, goes to run a special function you wrote, and when that function code is finished it goes back to the normal code.
-
that cleared my fundamentals thank u ..