Embedded Systems September 2000 Vol13_10

Issue link:

Contents of this Issue


Page 155 of 229

In our implementation, each event-driven task has a single input queue, implemented as a ring buffer. In addition to all these features, we the 1/0 scanner task from the RS- 232 sending task. All this is achieved using the proven and re liable, if extremely unoriginal, technique of execution counters, and is described in the Periodic Tasks section. need to perform a variety of small but important duties. For example, we want to dim the LCD exactly one minute after the very last key was pressed. We also want to flash a cursor on the LCD at a periodic, fixed and exact frequency. Since dedicating a separate task to each of these func- tions is definitely overkill , we handle them through software timers. Rather than being explicitly called from the main control loop, the function to turn the cursor on/ off is called indi- rectly from TMR_process task, which is the only non-user-defined task in the main control loop. II= ¥ Event-driven tasks Figure 1 shows the concept of an event-driven task. In our implementa- tion, each event-driven task has a sin- gle input queue, implemented as a ring buffer. Two functions are provid- ed, PutEvent, to be used by any task when an event needs to be inserted in the queue, and GetEvent, to extract the message. GetEvent will be used exclusively by the task itself and will not be called by other tasks. See Listing 2. Please note that the EVENT_TYPE Download Free software today, and configure your embedded design with your mouse! designers needing to integrate programmable logic along with high density Flash and SRAM into embedded designs. Unlike all other options, PSDs form an integrated system level solution ·~•...,-·J••• that saves time, power, and costs. Waferscale's development/programming tools ... PSDsoft Express and the new PSDsoft 2000, provide an easy to use, point and click user interface in which an engineer can accomplish in a couple of hours what may have, in the past, taken several days. Visit our website today to le

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems September 2000 Vol13_10