© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Bus-Based Computer Systems Example: alarm clock 1.

Slides:



Advertisements
Similar presentations
Parallel and Distributed Simulation
Advertisements

Programmable Interval Timer
TLA. Replacing The Battery On the Back of the pager press in this button while moving the door away from the pager, then lift up. On the Back of the pager.
Chapter 4 The Embedded Computing Platform 金仲達教授 清華大學資訊工程學系 (Slides are taken from the textbook slides)
© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Processes and operating systems Telephone answering machine. 1.
Set Time Set Initial Parameters: MIN=0 HOUR=6 AMPM=1 AMIN=0 AHOUR=12 AAMPM=0 PULSE=O COUNTER1=0 COUNTER2=0 ALARMFLAG=0 BRT=0 LEDSTATUS=0 TWLGT=0 ON=0 OFF=255.
5:47 1: Default Clock State PM Alarm off, time set to 5:47PM. Hour
Debouncing Switches Mechanical switches are one of the most common interfaces to a uC. Switch inputs are asynchronous to the uC and are not electrically.
Active Capture Design Space Ana Ramírez Chang BiD Seminar 3 November 2005.
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Networks zExample: elevator controller.
Discrete Event Simulation Event-Oriented Simulations By Syed S. Rizvi.
Lecture 3 IAT 800. Sept 15, Fall 2006IAT 8002 Suggestions on learning to program  Spend a lot of time fiddling around with code –Programming is something.
Wireless Networks Lab – Callback Function 2015/6/30.
© 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed. Introduction Object-oriented design. Unified Modeling Language (UML). 1.
Automated Coffee Machine Group Members: Billy Whitehouse Matthew Bitterman Jamie Cochran code.google.com/p/automated-coffee-machine/
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Program design and analysis zSoftware modem.
Alarm Clock Robert Stuart. 1.Keep track of time. 2.When the time matches a stored value an alarm should go off. 3.Functionality that allows for the user.
New Mexico Computer Science For All More Looping in NetLogo Maureen Psaila-Dombrowski.
Sept EE24C Digital Electronics Project Design of a Digital Alarm Clock.
JavaScript Events and Event Handlers 1 An event is an action that occurs within a Web browser or Web document. An event handler is a statement that tells.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
CS 325: Software Engineering February 26, 2015 Object-State Modeling for Event-Driven Systems Event-Driven Systems UML State Machine Diagrams State Pattern.
1 CSC103: Introduction to Computer and Programming Lecture No 2.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Programming & Scratch. Programming Learning to program is ultimately about learning to think logically and to approach problems methodically. The building.
Introduction to Robo Pro
Pattern Hatching - John Vlissides Pages 85 – 101 Todd Anderson
© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. System design techniques Quality assurance. 1.
© 2000 Morgan Kaufman Overheads for Computers as Components I/O devices  I/O devices:  serial links  timers and counters  keyboards  displays  analog.
Statements That Repeat. For...Next Loop Structure For counter = start To end Step increment statements Next counter Where Counter is tested to see if.
Computer Science SS2013 Team 5 Final Presentation 26 June © FH AACHEN | FACHBEREICH 08 | Computer Science, SS2013.
Time Management.  Time management is concerned with OS facilities and services which measure real time, and is essential to the operation of timesharing.
Introduction 2 Smart Design. What is smart design? 2 Everything is designed except nature The packaging of a Band-Aid The curve of a bike frame The shape.
EPICS EPICS Limitations Bob Dalesio Marty Kraimer.
State Design Pattern. Behavioral Pattern Allows object to alter its behavior when internal state changes Uses Polymorphism to define different behaviors.
CSC 107 – Programming For Science. Today’s Goal  Know how to use and write for loops  Explain why to use for, while, & do-while loops  Convert between.
Java Coding 8 David Davenport Computer Eng. Dept., Bilkent University Ankara - Turkey. Object-Oriented Design Examples.
Senior DesignSoftware-1Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with.
Senior Design Dec06-04 Diana Calhoun (Communication Coordinator) Matt Koch (Group Leader) Kelly Melohn (Communication Aide) Yesuratnam Thommandru (Group.
Digital Control CSE 421.
The embedded systems platform
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
Data Handling in Algorithms. Activity 1 Starter Task: Quickly complete the sheet 5mins!
Wake Assure Alarm Clock by Ameriphone Dr. Jacqui Cyrus By: Lily Bordallo.
An insulin pump. Needle Assembly: Connected to pump. Component used to deliver insulin into the diabetic body.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
Introduction to Simulation What is a simulation? A system that represents or emulates the behavior of another system over time; a computer simulation is.
Sensor Information: while loops and Boolean Logic.
The embedded systems platform
Identify the Appropriate Method for Handling Repetition
Visual Basic Fundamental Concepts
Val Manes Department of Math & Computer Science
Programming & Scratch.
EC6703 EMBEDDED AND REAL TIME SYSTEMS
Choose a Count down Time by Clicking a Button Below.
Overheads for Computers as Components
Introduction Example: model train controller..
Visual Basic..
תכן UML in Design מקורות: S. R. Schach: Chapter 12
Parallel and Distributed Simulation
Bus-Based Computer Systems
Loops CIS 40 – Introduction to Programming in Python
System design techniques
Overheads for Computers as Components 2nd ed.
Processes and operating systems
Overheads for Computers as Components, 2nd ed.
Overheads for Computers as Components 2nd ed.
Processes and operating systems
Overheads for Computers as Components, 2nd ed.
State Design Pattern.
Presentation transcript:

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Bus-Based Computer Systems Example: alarm clock 1

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Alarm clock interface Alarm on Alarm off Alarm ready set time set alarm hourminute light button PM buzzer 2

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Operations Set time: hold set time, depress hour, minute. Set alarm time: hold set alarm, depress hour, minute. Turn alarm on/off: depress alarm on/off. 3

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Alarm clock requirements 4

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Alarm clock class diagram Lights*DisplayMechanism Buttons* Speaker*

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Alarm clock physical classes Lights* digit-val() digit-scan() alarm-on-light() PM-light() Buttons* set-time(): boolean set-alarm(): boolean alarm-on(): boolean alarm-off(): boolean minute(): boolean hour(): boolean Speaker* buzz() 6

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Display class Display time[4]: integer alarm-indicator: boolean PM-indicator: boolean set-time() alarm-light-on() alarm-light-off() PM-light-on() PM-light-off() 7

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Mechanism class Mechanism Seconds: integer PM: boolean tens-hours, ones-hours: boolean tens-minutes, ones-minutes: boolean alarm-ready: boolean alarm-tens-hours, alarm-ones-hours: boolean alarm-tens-minutes, alarm-ones-minutes: boolean scan-keyboard() update-time() 8

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Update-time behavior update seconds with rollover update hh:mm with rollover Rollover? T F PM=truePM=false AM->PM PM->AM display.set-time(current time) Time >= alarm and alarm-on? alarm.buzzer(true) T F 9

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Scan-keyboard behavior compute button activations alarm-ready= true alarm-ready= false alarm.buzzer(false) Increment time tens w. rollover and AM/PM Increment time ones w. rollover and AM/PM save button states Alarm-on Alarm-off Set-time and not set-alarm and hours Set-time and not set-alarm and minutes 10

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. System architecture Includes: periodic behavior (clock); aperiodic behavior (buttons, buzzer activation). Two major software components: interrupt-driven routine updates time; foreground program deals with buttons, commands. 11

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Interrupt-driven routine Timer probably can’t handle one-minute interrupt interval. Use software variable to convert interrupt frequency to seconds. 12

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Foreground program Operates as while loop: while (TRUE) { read_buttons(button_values); process_command(button_values); check_alarm(); } 13

© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Testing Component testing: test interrupt code on the platform; can test foreground program using a mock- up. System testing: relatively few components to integrate; check clock accuracy; check recognition of buttons, buzzer, etc. 14