System Software Design Scrolling Message Display By: Derek Valleroy
Kernel Selection MicroC/OS-II Task Synchronization Message Passing with Semaphores and Buffers
Tasks and ISRs Main Task Startup Task User Interface Task LED Scroll Creates the startup task. Startup Task Initializes peripherals and creates message bitmaps. User Interface Task Allows users to change messages, sign intensity, speed, etc. Uses a PC with a terminal program. LED Scroll Continuously updates the Display to give a scrolling effect. Store String Stores messages in EEPROM. SCI Task Sends messages to the User Interface task. SCI ISR Queues data received from the keyboard.
Task/ISR Specs Task/ISR Priority Task Type Task Period Task Exec. Time CPU Load Average Peak Main -- 5us Startup 4 One time through User Interface 5 Sporadic 10ms 250ms (max) (avg.) 2ms .008 .2 LED Scroll 7 Periodic 20ms 72us .0036 Store String 8 100ms 18ms 5us (max) (avg.) .00005 .18 SCI task 6 (max) (avg.) 3us .000012 .0003 SCI ISR .5ms 250ms 2us .00006 .004 Total: .0122 .38
Module/Library Description MessDisp.c Contains the main source code and User Interface code. LEDWrite.c Provides LED drivers with the proper signals. BasicIO.s12 Used for terminal communication with SCI. ASCIItoMEM.c Contains the code for storing messages in EEPROM. SCI.c SCI task code and ISR.
Module/Library Description MessDisp.c The module that is most specific to this project. Functions: none Public Data: mssgpntr, speedpntr, intenspntr Tasks: main(), startup(), UItask()
Module/Library Description LEDWrite.c Communicates with the LED drivers over the SPI. Functions: SPIInit(), DriverInit(), LEDWrite() Data: none Tasks: LEDScroll()
Module/Library Description BasicIO.s12 Contains routines for SCI communication. (reused code) Source: Todd Morton. Functions: sci_open(), putstrng(), outcrlf(), getchar() Data: none Tasks: none
Module/Library Description ASCIItoMEM.c Stores messages in EEPROM. Also converts a string of ASCII characters into a bitmap. Functions: EEPROMInit(), Bitmap() –public Data: mssgpntr,speedpntr,intenspntr Tasks: StoreString()
Module/Library Description SCI.c Takes care of user inputs from a keyboard. An ISR signals an incoming character and the SCItask stores it in a buffer. Functions: SCIinit() Data: keychar –public Tasks: SCItask()
Intertask Communications messpntr speedpntr Store String intenspntr OSQpend() SCI ISR Ready Flag OSSemPend() OSSemPost() OSQpost() SCI Data Data Data Bitmap() Ring Buffer Message Bitmap SCI Task User Interface Task messpntr OSSemPost() OSSemPend() Ack Flag LED Scroll