Download Embedded Multitasking with small - innovated
Transcript
246 Chapter 4 Taking each task in turn, we can now begin the design of timer functions for each task. We start with the basic timing information for the task and a quick review of how the timing information is organized: Notes Task1 (LED) scan flash response flash offtime blank blank response 5 50 1000 2000 8 ( 100) (1100) (2222) ( 16) LED Display task notes: Scan rate for the task is 360Hz +20/-0 (2.635 - 2.777mS) The scan rate if for one digit to the next digit update (not time between same digit updates) Alarm flash 0-50mS following time update Alarm flash is ½ second off, ½ second on +/-10% Blank time 909.9mS to 1111.1mS +/-0 overall (basically, if blank, then blank for full second) Blank response within 8mS after time update, maximum Blank is synchronized to time update Next, we separate the event-to-event timing requirements from the response time requirement. Continuing our example with the clock: Notes Task1 (LED) Event-event scan flash offtime blank Response flash response blank response 5 1000 (1100) 2000 (2222) 50 ( 100) after time update 8 ( 16) after time update One important point to note about both response times is that the minimum can be zero; only the maximum is specified. So, it will typically be more convenient for the design to just use the event to trigger the start of the function, rather than create a skip timer for it.