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

Back to Subject List

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


 
#140425 - I don't think so, it seems to work pretty well...
Responding to: ???'s previous message
Sorry about the delay, I can only post during breaks and when I remember to at home.

Okay, general structure: my (probably overbuilt) serial ISR receives characters and puts them into a buffer (a simple array) accessed only by itself. When the message composed of those characters is complete, it clears its message buffer and puts a unique identifier (a single character) representing that message into the cache data structure discussed earlier. That cache is then accessible by the main program code, which changes its behavior based on what messages are present in the cache.

When the cache is searched, it simply returns the first entry matching the search criteria. That entry is then marked as "old" data, and is eventually overwritten.

Did that clarify matters? I know I should probably put more of the serial ISR's code into the main loop, but it seems pretty happy right now, and is nowhere near long enough to run into its next invocation.

-Bob

List of 20 messages in thread
TopicAuthorDate
Software design problem            01/01/70 00:00      
   Something like this, maybe?            01/01/70 00:00      
      Well, yes, actually...            01/01/70 00:00      
      Duhr and a question            01/01/70 00:00      
         Which ones did you look at ?            01/01/70 00:00      
         Duhr and an answer            01/01/70 00:00      
   Is it not possible to            01/01/70 00:00      
      Horses for courses            01/01/70 00:00      
         have fun            01/01/70 00:00      
   A Queue?            01/01/70 00:00      
      I used what I called a \'cache\'            01/01/70 00:00      
         Gah, code repost            01/01/70 00:00      
            you need to read it all, THEN process            01/01/70 00:00      
            Your approach is much more general...            01/01/70 00:00      
               Prioritizing?            01/01/70 00:00      
            Some suggestions Bob            01/01/70 00:00      
               Thank you, sir!            01/01/70 00:00      
                  Division / modulus not always slow            01/01/70 00:00      
         Are we making this too difficult?            01/01/70 00:00      
            I don't think so, it seems to work pretty well...            01/01/70 00:00      

Back to Subject List