Department of Electronic & Electrical Engineering Program design. USE CASES. Flow charts. Decisions. Program state.

Slides:



Advertisements
Similar presentations
Applications of PICs Advantages/disadvantages Digital and analogue control Loops, sub-routines, scanning, counting and feedback Interrupts Problems with.
Advertisements

P3- Represent how data flows around a computer system
Introduction to Computer Engineering ECE 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin –
Give qualifications of instructors: DAP
Programmable Interval Timer
In this presentation you will:
Flow Charts, Loop Structures
Programming Logic and Design Fourth Edition, Introductory
Session Objectives# 24 COULD code the solution for an algorithm
The Little man computer
System Analysis (Part 1)
CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Computer Systems. Computer System Components Computer Networks.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
Networked HVAC Controller Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski.
1 CSI 101 Elements of Computing Fall 2009 Lecture #4 Using Flowcharts Monday February 2nd, 2009.
State Machines Used to Design Sequential Circuits.
Chapter 11-12, Appendix D C Programs Higher Level languages Compilers C programming Converting C to Machine Code C Compiler for LC-3.
IT Systems Flip - Flops EN230-1 Justin Champion C208 –
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 20 Datapath and Control Datapath - performs data transfer and processing operations.
Sequential Circuit Introduction to Counter
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
ECE 265 – LECTURE 17 Simulator Project 8/7/ ECE265.
The Computer Processor
ECEN 248 Lab 6: De-Bouncing, Counters & LCD Display Control
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
PLC: Programmable Logical Controller
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Machine level architecture Computer Architecture Basic units of a Simple Computer.
Secondary Storage GCSE Computing. Objectives… Understand the need for input and output devices. Describe suitable input devices for a wide range of computer.
Forging new generations of engineers
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
How Computers Work … and how you can work them. Art 315 Lecture 03 Dr. J Parker Fall 2010.
Senior Project Presentation: Designers: Shreya Prasad & Heather Smith Advisor: Dr. Vinod Prasad May 6th, 2003 Internal Hardware Design of a Microcontroller.
Introduction to Software Development. Systems Life Cycle Analysis  Collect and examine data  Analyze current system and data flow Design  Plan your.
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
Computer Systems Week 7: Looping and Input/Output with 3-bit Alma Whitfield.
Computer Science SS2013 Team 5 Final Presentation 26 June © FH AACHEN | FACHBEREICH 08 | Computer Science, SS2013.
Timer Timer is a device, which counts the input at regular interval (δT) using clock pulses at its input. The counts increment on each pulse and store.
Chapter 2 Introducing the PIC Mid-Range Family and the 16F84A The aims of this chapter are to introduce: The PIC mid-range family, in overview The overall.
COMPUTER CONCEPTS Unit A: Computer and Internet Basics 1.
Interactive Control in Engineering Projects Electronics and Control.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
An Example Architecture. A Paper Computer - Woody Woody's characteristics Word size – 8 bits One word.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Iteration. Iteration: Review  If you wanted to display all the numbers from 1 to 1000, you wouldn’t want to do this, would you? Start display 1 display.
Lecture 7: Overview Microprocessors / microcontrollers.
How a Computer Processes Data. With today’s technology a little knowledge about what’s inside a computer can make you a more effective user and help you.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Department of Electronic & Electrical Engineering Lecture 2. PIC16F84A Architecture / Instructions Memory. Program/Data (Harvard) File Registers (Data).
Department of Electronic & Electrical Engineering Combination Lock. Plan. Demo. Brief Report. Code.
Department of Electronic & Electrical Engineering PIC simulator. Quick intro to using the MPLABX PIC simulator.
Department of Electronic & Electrical Engineering Digital Lock. (e.g. for sports locker room) Assessment: Plan. Demo. Code.
Computer Parts And Components PERIPHERALS. Definition of Peripherals External hardware devices attached to the computer are called peripheral devices.
Department of Electronic & Electrical Engineering Lecture 4. ➢ Loops ➢ Delays ➢ Conditional instructions ➢ Simple clock example.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Instruction Memory value Description ADD1xx Add the value stored at memory address xx to the value in the accumulator register SUB2xx Subtract the value.
Computing Science Computer Structure: Lesson 1: Processor Structure
The Little man computer
Peripherals – Keypad The Keypad provides a simple means of numerical data or control input. The keys can be attributed whatever data or control values.
CS501 Advanced Computer Architecture
ECE 434 Advanced Digital System L13
Final Exam Review Department of Electrical and Computer Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Input-Output-Process Demo
Chapter 4: Repetition Structures: Looping
Counter Fundamentals Presented by :
Presentation transcript:

Department of Electronic & Electrical Engineering Program design. USE CASES. Flow charts. Decisions. Program state.

Department of Electronic & Electrical Engineering USE CASES. Useful for defining the interaction of the device with the user. Description of an interaction with the user.

Department of Electronic & Electrical Engineering INCREMENTAL DESIGN Start with simple use cases and then introduce more complexity. Your program evolves! Initial attempts are useful to learn about the problem. USE CASE

Department of Electronic & Electrical Engineering USE CASE 1: basic clock What should it do? Turn on CLOCK starts at 0. Displays (rate is 1 per second) Only need a COUNTER to store value of the clock. SOME DID NOTE EVEN USE A COUNTER (see discussion on state later in this lecture)

Department of Electronic & Electrical Engineering FLOW CHARTS / PSUEDO CODE Use flow charts and/or pseudo code. In the design stage. To document how your code works.

Department of Electronic & Electrical Engineering FLOW CHART FOR BASIC CLOCK I should be able to understand how your program works by looking at your flow chart Simplify by encapsulation ( if not needed to understand high level working.) Document the lower level. DISPLAY COUNT

Department of Electronic & Electrical Engineering USE CASE 2: up/down button Use routines to simplify high level code

Department of Electronic & Electrical Engineering countdown subroutine

Department of Electronic & Electrical Engineering USE CASE 3: Up/Down/Stop Program now has 3 modes. 1.count up count down stop. Hold current value We can use a register to store the MODE.

Department of Electronic & Electrical Engineering up/down/stop flow chart. We can reuse our existing count up/down/delay code

Department of Electronic & Electrical Engineering CASE 3 code Switch / if block

Department of Electronic & Electrical Engineering State of a computer program. "The state of a computer program is a technical term for all the stored information, at a given instant in time, to which program has access.computer program The output of a computer program at any time is completely determined by its current inputs and its state.outputinputs

Department of Electronic & Electrical Engineering State of a PIC Contents of the registers User DATA (file registers) Inputs (PORTA,PORTB) Working register Program counter (where we are in code) STATUS register... more Program in memory (hmmm).

Department of Electronic & Electrical Engineering CLOCK EXAMPLE user defined state COUNTER (value of the clock) MODE (up/down... etc)... more ? QUESTION: Some students did not use a COUNTER. How was the state of the clock stored in this case?