Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.

Slides:



Advertisements
Similar presentations
Introduction to the SPL Interpreter
Advertisements

ISPSoft Create a Project.
Lab7: Introduction to Arduino
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Copyright © 2005 Rockwell Automation, Inc. All rights reserved. 1 Micro Logix 1100 RSLogix 500 LAB#2 Timing, Counting & Comparing.
Tutorial 8: Developing an Excel Application
Java Programming, 3e Concepts and Techniques Chapter 4 Decision Making and Repetition with Reusable Objects.
ENGR 101: Robotics Lecture 2 – Text Programming Outline  Introduction to PBASIC  Variables, I/O, Arithmetic  Controlling the LEDs References 
Introduction to a Programming Environment
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Dr. Hoganson CSIS HC11 Demo Program This is our first lab using the 68HC11 microcontroller. We will “talk” to the microcontroller from a PC, run.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
Systems Software Operating Systems.
PS2 Keyboard Interface Using Spartan-3 Starter Kit Board
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
The Operating System. Operating Systems (F) What you need to know about –operating system as a program; –directory/folder.
Chapter 2 Software Tools and Assembly Language Syntax.
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
CHAPTER 1 XNA Game Studio 4.0. Your First Project A computer game is not just a program—it is also lots of other bits and pieces that make playing the.
CS102 Introduction to Computer Programming
Chapter Introduction to Computers and Programming 1.
Serial Communication Lab 12 Module M21.1. Asynchronous Serial I/O ASCII code 54H = (“T”) sent with odd parity.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Should be on Up to hear patient button presses Down to mute. In either case the #1 and #2 lights should light with each button press. Leave the 5 to the.
CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu.
Slide 1 System Software Software The term that we use for all the programs and data that we use with a computer system. Two types of software: Program.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
P.1ECE 331, Prof. A. Mason Professor Andrew Mason Michigan State University Spring 2013 ECE 331: PC Lab 1: Using HC12 ASM Simulators.
Acceleration Based Pedometer
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Record & run a macro Record & run a macro Save as a macro-
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Vintage Computer Hardware 101 Featuring the MITS Altair 680b Bill Degnan.
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Editors And Debugging Systems Other System Software Text Editors Interactive Debugging Systems UNIT 5 S.Sharmili Priyadarsini.
Chapter 0 Getting Started. Objectives Understand the basic structure of a C++ program including: – Comments – Preprocessor instructions – Main function.
Algorithms  Problem: Write pseudocode for a program that keeps asking the user to input integers until the user enters zero, and then determines and outputs.
Chapter Three The UNIX Editors.
Lab 2 Parallel processing using NIOS II processors
Java Programming, 2E Introductory Concepts and Techniques Chapter 4 Decision Making and Repetition with Reusable Objects.
1 Software. 2 What is software ► Software is the term that we use for all the programs and data on a computer system. ► Two types of software ► Program.
1 CA203 Presentation Application Reviewing and Sharing a Presentation Lecture # 11.
Slide 1 Project 1 Task 1 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Survey Form Simply put a cross in.
Digital Literacy: Computer Basics
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
An electronic document that stores various types of data.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Excel Tutorial 8 Developing an Excel Application
Development Environment
Programming and Debugging with the Dragon and JTAG
Guide To UNIX Using Linux Third Edition
Introduction to Events
Describe how NASA remotely controls equipment in space.
MicroEconomix 1500 RSLogix 500 LAB#2
ECE 3567 Microcontroller Lab
Homework Reading Programming Assignments Finish K&R Chapter 1
Microsoft Excel 2007 – Level 2
ECE 3567 Microcontrollers Lab
Presentation transcript:

slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer Controlled Stop Watch

slide 2 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking The Technology Used  Based on the Microcontroller card you have built  Controlled by a C program compiled on PC to run on the Microcontroller card.  ASCII characters are used to transfer data between PC and microcontroller  You can use a terminal emulator on the PC, there is no special program for the PC

slide 3 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Sample Program  The project worksheet contains a sample program  This is the same program used to test the serial port of your microcontroller card in the lab  Action - every second, the microcontroller sends the time to the PC as a text string over the serial interface.  The time can be displayed on a PC using any terminal program (9600bps, 8 bit, no parity)

slide 4 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking First Task  You first job is to understand the program and produce documentation for it.  To do this you should: o Compile and run the program o Add comments to the program o Produce Pseudocode for the program  Copies of the commented program and Pseudocode must be submitted to your Supervisor

slide 5 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Compiling the Program  The C program on the worksheet is to run on the microcontroller.  This processor uses different machine instructions to the PC  Visual C++ produces machine instructions for the PC - it won’t run on the microcontroller.  CC51 is a C compiler which produces machine instructions which run on the microcontroller

slide 6 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking The Process of Compiling To compile a program for the microcontroller:  Produce the text C code using any text editor  Use CC51 to compile the program o Make sure there are no errors  Transfer the file produced into the microcontroller (use EPROM programmer) o Compiler produces a HEX format file  Insert the microcontroller in your card and test.

slide 7 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Documenting the Program  Before starting to write a new program, you will gain some practice at documenting programs  You should : 1. Understand what the program does (run it if necessary) 2. Add comments to the program 3. Write a Pseudocode description of the program (this should be done before writing a program)

slide 8 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Sample Documentation  Consider the program on the microcontroller used with the dice as an example.  Problem : Send a ‘Y’ when the button is pressed and send a ‘N’ when the button is released. At the same time, display any received character on the LEDs.  The following shows 3 ways to describe the problem.

slide 9 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking State Diagram action trigger

slide 10 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Flow Chart

slide 11 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Pseudo Code Do forever[while ( true is true )] { while ( key not pressed ) { if (character received) { get character display pattern } } send ‘ Y ’ while ( key pressed ) {if (character received) { get character display pattern } } send ‘ N ’ }

slide 12 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Comments on Techniques  State Diagram – good graphical technique for describing a process. Doesn’t help much in writing program. Can be used to clarify design before writing pseudocode  Flow Chart – good at describing sequential processes. Doesn’t help much in writing high level programs, but good for machine level coding.  Pseudocode – good at describing complex processes. Helps to write high level code.

slide 13 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Creating a Stop Watch Function  You now understand the program ! ! !  You must modify the program to make it work as a stop watch.  Stop watch control is via the serial interface  Characters entered on the PC keyboard will control the Stop watch hitting the space bar will toggle the Stop watch on and off R resets the display to zero

slide 14 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking System Diagram Type to turn on Type to turn off Send ASCII characters of time to display 00:01:45

slide 15 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking What You Must Do  Firstly, make sure you understand what the Stop watch does – ask if you don’t understand  Modify the Pseudocode for the clock program to make it act as a stop watch  Code this in C  Produce a text file of the program  Compile using CC51  Load the code into the microcontroller  Test the functionality and debug if necessary

slide 16 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Creating a Clock Function  Create a new Pseudocode for a Clock which responds to the following commands : A sets the clock to adjust mode. In adjust mode the clock stops until it receives Digit in adjust mode, the digits are entered into 1021 the current time in adjust mode, go back to last entered digit in adjust mode, returns to clock mode

slide 17 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking What You Must Do  Again, you must first understand the problem.  In this example, the functionality isn’t so well defined – you have some options, e.g. o What is displayed on the PC in adjust mode o What is displayed on PC when a is received  When you have decided, write Pseudocode o A State Diagram may help planning  Produce the C program, compile, test and debug

slide 18 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Integrating the Functions  When both Stop watch and Clock are working :  Try to combine both Stop watch and Clock into 1 program.  The combined program should respond to the extra commands : C if in Stop watch mode, switch to Clock mode S if in Clock mode, switch to Stop watch mode

slide 19 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking The Combined Clock  The Clock must keep the right time, even if it is in Stop watch mode.  Hence, clock must keep running in both modes  The program will need a separate variables for the Clock and Stop watch.  The Stop Watch can keep running in Clock mode  The Clock will stop in adjust mode – you can decide what the Stop watch does.

slide 20 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Working with the Push Button  So far, all control has been using the PC keyboard sending ASCII characters to the microcontroller.  Here, go back to the Stop watch to make it controlled by the button on the card  Control is : Push buttontoggles the stop watch on and off Hold buttonif pushed >1sec, time resets to zero

slide 21 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking What you must submit  For all 4 programs, you must submit a short report on your program containing: o The Pseudocode o The C program (including comments) o A description of the operation of the program  Submit report when all 4 programs are done.  Your supervisor will check to see your program working before moving to the next stage.

slide 22 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking For the Brighter Students  It is possible that some groups will finish the three programs within 4 weeks.  We do not expect all groups to finish that quickly. However, you must finish all three programs.  The faster groups can then move on the next project task – implementing a network.  This task has scope for groups to make their own design.