90 likes | 172 Views
Naman Chopra Suan-Aik Yeo 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
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