150 likes | 172 Vues
Wireless Optical USB Mouse. System Software Design By: Reza Afshari April 26, 2005. Kernel Selection. Real-time Preemptive Multitasking Kernel Task Synchronization. Micro C/OS-II. Task Priorities. Startup Task – 4 Power Management Task – 5 Sensor Task – 6 Button Detection Task – 7
E N D
Wireless Optical USB Mouse System Software Design By: Reza Afshari April 26, 2005
Kernel Selection • Real-time Preemptive Multitasking Kernel • Task Synchronization Micro C/OS-II
Task Priorities • Startup Task – 4 • Power Management Task – 5 • Sensor Task – 6 • Button Detection Task – 7 • Encode Task - 8
Startup Task • Priority: #4 • Description • Initializes System • Creates Tasks Period: One time through (at startup) Execution Time: ~50us
Power Management Task • Priority: #5 • Description • Places mouse in lower levels of power consumption during times of no movement Period: ~1 ms Execution Time: ~15 us
Sensor Task • Priority: #6 • Description • Receives optical sensor movement, if any, and updates the buffer. Period: sporadic Execution Time: ~5 us
Button Detection Task • Priority: #7 • Description • Checks the status of the two mouse buttons and updates the buffer. Period: Sporadic Execution Time: ~5 us
Encode Task • Priority: #8 • Description • Converts the movement data and button status into mouse report format using the microsoft mouse protocol Period: sporadic Execution Time: ~20 us
CPU Load L max = 15 us + 5 us + 5 us + 20 us 1 ms 1 ms 1 ms 1 ms = 4.5%
Module Description Reused Code: SPI_DRIVER.c, written by Jon Peterson