1 / 13

Conserve-A-Watt

Conserve-A-Watt. System Software Design Justin Rapozo. General System Description. MC9S12DP512 24MHz Bus Frequency 16K bytes RAM, 4K bytes EEPROM, 512K bytes Flash EEPROM Memory Required 2K bytes RAM 36K bytes Flash EEPROM Kernel Used MicroC/OS-II 1 ms tick period. Tasks. Start Task

vinaya
Download Presentation

Conserve-A-Watt

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Conserve-A-Watt System Software Design Justin Rapozo

  2. General System Description • MC9S12DP512 • 24MHz Bus Frequency • 16K bytes RAM, 4K bytes EEPROM, 512K bytes Flash EEPROM • Memory Required • 2K bytes RAM • 36K bytes Flash EEPROM • Kernel Used • MicroC/OS-II • 1 ms tick period

  3. Tasks • Start Task • UI Task • Key Task • Energy Meter Task

  4. Start Task • Creates the User Interface Task, Energy Metering Task, and Key Task • Priority: 4 • Period: Once (at startup) • Execution Time: ~1s

  5. Energy Metering Task • Handles measuring energy usage of the device under test. • Irms • Vrms • Calculates Preal. • Calculates energy consumption in kWh. • Handles the storing and deleting of energy consumption. • Priority: 5 • Period: 1ms • Execution Time: 200µs

  6. Key Task • Checks for key presses so as to give the user options • Priority: 6 • Period: 5ms • Execution Time: ≤ 5µs

  7. UI Task • Handles user inputs and Displays real time/saved energy measurements. • Priority: 7 • Period: 500ms • Execution Time: 4ms (max)

  8. CPU Load • EnergyMeterTask Load: 200µs/1ms = 0.2 • KeyTask Load: 5µs/5ms = 0.01 • UITask Load: 4ms/500ms = 0.008 Total CPU Load(Max) = 0.1+0.01+0.008 = 0.218 x 100% = 21.8% Average CPU Load = 20.8%

  9. Modules

  10. Main Dataflow Hardware EnergyMain.c Hardware Meter.c ReadCurrent() ReadVoltage() Buttons LCD KeyTask UITask Key Energy Flag EnergyMeterTask

  11. A to D Dataflow AtoD.c A/D Converter AtoDI/O AtoDInitialize() 1ms ReadCurrent() PAD00 PAD01 ReadVoltage() ATDCTL5 AN0-1 ADR0DR0H A/D ADR0DR1H

  12. FlashEEPROM Dataflow UITask EnergyMain.c Hardware FlashEEPROM Meter.c EnergyMutex Key EnergyMeterTask

  13. Questions? Comments?

More Related