solar powered
play

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


  1. SOLAR POWERED FIELD WEATHER STATION System Software Design Dean Zimmermann WWU Spring 2010

  2. General System Design  Freescale 9S08QE128 Microcontroller  24 MHz Bus Frequency  Available Memory: 128K Flash/8K RAM  Required Memory: 10K Flash/4K RAM  Timeslice Kernel – 10ms Period

  3. Timeslice Kernel Tasks • Timeslice Task • User Interface Task • Clock Task • Sensor Task • SD-Card Write/Read Task • Key Task

  4. Timeslice Task  Period: 10ms  Waits for periodic timing event to initialize task loop  Puts the MCU to sleep to save power

  5. User Interface Task  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

  6. Clock Task  Period: 1s (periodic)  Execution Time ~ 4us (max)  Updates Time and Date information

  7. Sensor Task  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 tables to convert data into meaningful forms

  8. SD-Card Write/Read Task  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

  9. Key Task  Period: 10ms (periodic)  Execution Time ~ 2 us (max)  Checks for key presses  Updates key buffer

  10. CPU Load Maximum

  11. Modules Module Tasks Public Functions and Data Author Main.c User Interface Task Current State Data Dean Zimmermann Timeslice Task Current Time/Date Data Struct Local Time/Date Data Struct Time.c Clock Task Time_DateGet(), Time_DateSet() Dean Zimmermann Weather.c SD-Card R/W Task Weather Data Structure Dean Zimmermann Sensor Task WeatherDataGet() Key.c Key Task KeyInit() Todd Morton GetKey() SPIDriver.c - InitSPI(), Read SPI(), WriteSPI() Dean Zimmermann LCD.c - LcdClrDisp(), LcdDispChar() Todd Morton LcdDispByte(), LcdDispString() LcdMoveCursor(), LcdCursor() OCDelay.c - OCDelay(), GetmsCnt() Todd Morton

  12. Overall State Diagram Past LIVE/PAST LIVE/PAST REC Live SET Record (reset) REC Button SET’ Hold SET SET Set (3 sec.)

  13. Data Flow: Sensors ADC I/O Weather.c SPIDriver.c Weather Data Structure PTF0 PTF1 Sensor Task SpiRead() Timer 3 Channel 0

  14. Data Flow: SD-Card Main.c Weather.c SPIDriver.c Weather Data Structure SpiRead() Time/Date Time_DateGet() SD-Card R/W Data Structure Task SpiWrite()

  15. Data Flow: User Interface-Display Weather.c Main.c Time.c Time/Date Time_DateGet() Data Structure Time_DateSet() Clock Task Weather Data User Interface Structure Task WeatherDataGet() Port E LCD Display

  16. Data Flow: User Interface-Keypad Main.c Key.c Port B GetKey() User Interface Key Task Task

  17. Questions?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend