SOLAR POWERED FIELD WEATHER STATION
System Software Design Dean Zimmermann
WWU Spring 2010
SOLAR POWERED FIELD WEATHER STATION System Software Design Dean - - PowerPoint PPT Presentation
SOLAR POWERED FIELD WEATHER STATION System Software Design Dean Zimmermann WWU Spring 2010 General System Design Freescale 9S08QE128 Microcontroller 24 MHz Bus Frequency Available Memory: 128K Flash/8K RAM Required Memory: 10K
WWU Spring 2010
Freescale 9S08QE128 Microcontroller 24 MHz Bus Frequency Available Memory:
Required Memory:
Timeslice Kernel – 10ms Period
Period: 10ms Waits for periodic timing event to initialize task
Puts the MCU to sleep to save power
Period: 50ms (periodic) Execution Time ~ 2ms (max) Displays information on the LCD and controls LEDs Handles user inputs to:
Change State Set Time and Date Set Sample Rate Navigate Stored Data
Period: 1s (periodic) Execution Time ~ 4us (max) Updates Time and Date information
Period: 500ms (periodic) Execution Time ~ 3ms (max) Receives information on A/D convertor Reads timer channel Communicates with pressure module through SPI Performs necessary calculations and uses lookup
Period: Sample Rate (sporadic) Execution Time ~ 1 ms (max) Uses SPI to communicate with SD-Card module Writes data to SD-Card
Writes at the sample rate specified by user Stores data blocks with time and date stamp
Reads Data blocks to display on LCD
Period: 10ms (periodic) Execution Time ~ 2 us (max) Checks for key presses Updates key buffer
Module Tasks Public Functions and Data Author Main.c User Interface Task Timeslice Task Current State Data Current Time/Date Data Struct Local Time/Date Data Struct Dean Zimmermann Time.c Clock Task Time_DateGet(), Time_DateSet() Dean Zimmermann Weather.c SD-Card R/W Task Sensor Task Weather Data Structure WeatherDataGet() Dean Zimmermann Key.c Key Task KeyInit() GetKey() Todd Morton SPIDriver.c
Dean Zimmermann LCD.c
LcdDispByte(), LcdDispString() LcdMoveCursor(), LcdCursor() Todd Morton OCDelay.c
Todd Morton
REC REC LIVE/PAST LIVE/PAST SET SET’ SET (3 sec.) SET Past Live (reset) Button Hold Set Record
Weather.c ADC I/O SPIDriver.c SpiRead() Timer 3 Channel 0 PTF0 PTF1 Weather Data Structure Sensor Task
Weather.c Main.c SPIDriver.c SpiRead() Weather Data Structure SD-Card R/W Task SpiWrite() Time/Date Data Structure
Time_DateGet()
Main.c Weather.c Time.c Port E Time/Date Data Structure User Interface Task Clock Task Weather Data Structure
Time_DateGet() Time_DateSet()
LCD Display
WeatherDataGet()
Main.c Key.c User Interface Task Port B Key Task
GetKey()