Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/16/06 20:13
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#122371 - the controller task
Responding to: ???'s previous message
In general, the task of a microcontroller can be summed up quite simply:

(1) examine inputs
(2) take appropriate action
(3) go to 1

Examining and interpreting the inputs is the key, of course, and, combined with the current state of the system, one determines the appropriate action and executes it.

If you had no interrupts, you'd examine the inputs as frequently as possible and practical, interpret them and take appropriate action.

Examining and interpreting inputs is a job that increases in complexity with the number and type of inputs. If, however, one can dedicate an interrupt to an input, then examining THAT input and interpreting its place in the greater scheme of things is essentially handled, or, at least, can be, by virtue of the fact that it essentially inserts the appropriate action in the form of the ISR at whatever point in the instruction stream that "blessed" event occurs.

It can, therefore, be seen as simplifying the remaining code as well as simplifying the task of handling that particular event.

RE


List of 31 messages in thread
TopicAuthorDate
Interupt question......            01/01/70 00:00      
   quick answer..            01/01/70 00:00      
   Noise            01/01/70 00:00      
   Perplexed......            01/01/70 00:00      
   Interrupt            01/01/70 00:00      
      does not matter            01/01/70 00:00      
         Attack            01/01/70 00:00      
            You did ask for it            01/01/70 00:00      
         Interruptifobia            01/01/70 00:00      
            There's not always a performance penalty            01/01/70 00:00      
               there is always an exception            01/01/70 00:00      
                  the controller task            01/01/70 00:00      
   very busy processor......            01/01/70 00:00      
      most likely it is not            01/01/70 00:00      
         PLC ?            01/01/70 00:00      
            since forever            01/01/70 00:00      
   Definatly a PLC....            01/01/70 00:00      
      a link            01/01/70 00:00      
      The application may be a PLC, but the chip is not            01/01/70 00:00      
         I do not think that is what David does            01/01/70 00:00      
   code......            01/01/70 00:00      
   Sorry......            01/01/70 00:00      
      Just post            01/01/70 00:00      
         code post.....            01/01/70 00:00      
            Posting Code and Idea            01/01/70 00:00      
            Where are ....            01/01/70 00:00      
   Ok back on this interupt routine            01/01/70 00:00      
      put an inverter on the pin            01/01/70 00:00      
   ZERO CROSS DETECTOR....            01/01/70 00:00      
      Saif, please and a note            01/01/70 00:00      
         actually...            01/01/70 00:00      

Back to Subject List