System Software Design Doorbell Jukebox Henry Arbicor and Arthur Bingcang
General System Design MCU – Freescale MCF52233 Bus Frequency – 60 MHz Memory Requirements ◦ 12 kB RAM ◦ 37 kB FLASH, no paging Timeslice Kernel ◦ Timeslice period: 10ms
Tasks 4) Start Task 5) MP3 Task 6) Push-button Task 7) LCD Task 8) Play Task
Start Task Initializes the system Sets up the order in which the other tasks will run Period: Once at Start-up Execution Time: 100ms
MP3 Task Reads MP3’s from MMC card and displays song names on the LCD Sets pointer that will move when different songs are selected Period: 100ms (periodic) Execution Time: 5ms
Push-button Task Recognizes push-button press De-bouncing Sets state ◦ Up ◦ Down ◦ Select ◦ Sequential ◦ Doorbell Period: 10 ms (sporadic) Execution Time: 5 us
LCD Task Display’s song names Adjusts display according to current state Period: 100ms (periodic) Execution Time: 2.5ms
Play Task When in Doorbell state, decodes and plays the selected song Period: 10ms (periodic) Execution Time: 3ms
CPU Load Load (max) = 5ms/100ms + 5 us/10ms + 2.5ms/100ms + 3ms/10ms =.3755 = 37.55% Load (average) = 5ms/100ms + 2.5ms/100ms =.075 = 7.5%
Modules TasksPublic Functions and Data Jukebox.c Start Task MP3 Task Push-button Task LCD Task Play Task PlaySong() StopSong() LCD.c By Todd Morton NoneAll LCD Functions OCDelay.c By Todd Morton NoneOCDelay() OCDelayInit() Coldfire MP3 Decoder Interface By Motorola Embedded File Systems Library By Lennart Ysboodt, Michael De Nil
Dataflow Diagrams: LCD Jukebox.cLCD I/O Push- button Task MP3 Task LCD Task LCD Button
Dataflow Diagrams: Audio Out MMC Card MP3 Task Push- button DAC Clock Speaker Play Task Jukebox.c External Hardware