90 likes | 185 Vues
This design guide outlines the software considerations for Alumoline's fuel cell instrumentation system. It covers loose speed and performance requirements, interrupt-driven organization, interfaces for communication, main and car interface hierarchies, and key flowcharts. The Atom board and microcontroller communicate via SCI, while SD card communication uses SPI. The system collects sensor data, logs it to SD card, and displays warning messages. The main and car interfaces manage sensor data, display updates, and system events efficiently. This guide helps optimize code size and system performance for Alumoline's fuel cell instrumentation project.
E N D
Naman Chopra Suan-AikYeo Ronny Wijaya Darin Tanaka Alumoline Fuel-Cell Instrumentation A.F.C.I. – Group 12
Software Design Considerations • Very loose speed requirements: dashboard display updates only twice each second • Very loose performance requirements: no complex computation required – use default speed of 24MHz • Don’t include libraries to optimize code size (except for FAT filesystem library) • Interrupt-driven organization: is simple and suits our tasks well.
Interfaces • Atom board <-> microcontroller communication: SCI • SD-card communication: SPI • Read Sensor Data: ATDs
Flowchart (microcontroller) Initialize registers and SD card loop Timer tick Update wall clock time received Atom board packet Logging interval packet Foreach sensor where log==true, write sensor value and current timestamp to file in SD card. Wall clock time packet Sensor data request Toggle logging req. Set wall clock time Set timer tick freq. toggle sensor logging Send sensor data Create file (name == timestamp) on SD card
Flowchart (Atom) Initializations UI event idle Send sensor data req. Timer event Set log rate Recv sensor data Toggle sensor logging Update display/ graph Sensor meter tapped Graph tapped Dangerous threshold reached “Customize display” tapped Display warning “shutdown” tapped shutdown
Hierarchy (microcontroller) • Main • Recv atom packet • Timer interrupt handler initialize • Update wall clock time • Send packet • Read ATDs • Create file Log sensor value SD command SD command
Main Hierarchy (Atom) • Car Interface • Read Serial Port Thread • Timer interrupt Meter panels • Data Buffer • Send serial port JFreeChart Check valid string Update chart if needed Update panels