Many students find it difficult understanding the concept of Object Oriented Programming (OOP) Lack of exciting labs leads to a loss of interest Created.

Slides:



Advertisements
Similar presentations
IO Interfaces and Bus Standards. Interface circuits Consists of the cktry required to connect an i/o device to a computer. On one side we have data bus.
Advertisements

Quality of a Class Abstraction: Coupling & Cohesion Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Seven Segment Display. What's A 7-Segment Display? A 7-segment display is a package with 7 bar-shaped LEDs arranged to allow the display of many useful.
OUTPUT INTERFACE – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Chung-Ta King National Tsing Hua University
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Khaled A. Al-Utaibi  Digital Vs Analog Signals  Converting an Analog Signal to a Digital One  Reading Analog Sensors with the.
 | bit OR & bit AND ~ bit NOT ^ bit EXLUSIVE OR (XOR) > bit RIGHT SHIFT.
90-70 DeviceNet configuration
FPGA BASED IMAGE PROCESSING Texas A&M University / Prairie View A&M University Over the past few decades, the improvements from machine language to objected.
Program Commenting CS-212 Dick Steflik. Commentary Commentary are pieces of information included in a program’s source files to provide additional information.
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 9: Pass-by-Value.
1 COSC 3P92 Cosc 3P92 Week 11 Lecture slides Violence is the last refuge of the incompetent. Isaac Asimov, Salvor Hardin in "Foundation"
RS232 Serial and Parallel Interfaces
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Boolean math is the cornerstone of digital communications, whether you are talking computers, PLC, or Cisco Routers on the Internet. ©Emil Decker, 2009.
Input Laboratory: GPIO Pin control needed to have the Blackfin accept your commands Re-uses information from ENEL353 and ENCM369 courses and text books.
Computer Sensing and Control How is binary related to what we are trying to accomplish in electronics? The PC GadgetMaster II uses binary to communicate.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
1 ARM University Program Copyright © ARM Ltd 2013 General Purpose I/O.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Bits, Bytes, Words Digital signal. Digital Signals The amplitude of a digital signal varies between a logical “0” and logical “1”. – The information in.
Modular Programming. Modular Programming (1/6) Modular programming  Goes hand-in-hand with stepwise refinement and incremental development  Makes the.
Secondary Storage GCSE Computing. Objectives… Understand the need for input and output devices. Describe suitable input devices for a wide range of computer.
Khaled A. Al-Utaibi  The Push Button  Interfacing Push Buttons to Arduino  Programming Digital Inputs  Working with “Bouncy”
FIRST GADGETEER PROJECT. Where are you? Making a VS project Parts of a C# program Basics of C# syntax Debugging in VS Questions? 2.
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
Two Parts of Every ADT An abstract data type (ADT)  is a type for encapsulating related data  is abstract in the sense that it hides distracting implementation.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Logic Gates It’s Only Logical. Logic Gates Are the switches that computers and similar devices use. They hold their state until something changes. Are.
Dr. Hoganson CSIS 4381 Input from Port D In this project, we will use port D as input and port A as output, by connecting three input bits of port D to.
P Chapter 2 introduces Object Oriented Programming. p OOP is a relatively new approach to programming which supports the creation of new data types and.
CPU Speaker Monitor Printer Touch pad Scanner Key Board Mouse Microphone.
ECS642U Embedded Systems Cyclic Execution and Polling William Marsh.
Definition of Object - Oriented Language.. Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions"
Binary System Presented by Mr. Wilhelmi Internal Representation of Data Input Input  Data that is put into the computer for processing Data Data  The.
Protocols Software Engineering II Wirfs Brock et al, Designing Object-Oriented Software, Prentice Hall, Mitchell, R., and McKim, Design by Contract,
Projects 8051.
Input Interface – Microprocessor
EE 316 Computer Engineering Junior Lab Project 2 Digital Yahtzee.
1-3 GPIO_Output(LuminaryLibrary) 1.Alter the output current to 4mA 2.Let LED0 turn on but LED 1 turn off. Modify your program in E:\yourname\arm.
Arduino Mega Arduino Mega 2560 Arduino Mega 2560.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Lab. 1 – GPIO Pin control Using information ENEL353 and ENCM369 text books combined with Blackfin DATA manual.
AND Gate Inputs Output Input A (Switch) Input B (Switch) Output Y (Lamp) 0 (Open) 0 (OFF) A B Lamp.
Embedded Programming and Robotics Lesson 11 Arduino Interrupts 1.
Module 13: Properties and Indexers. Overview Using Properties Using Indexers.
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
WHY PARALLEL PORT? The simplest computer controlled robot Requires only basic programming skills in C to start off with Can take inputs from your robot.
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
Prof. I. J. Chung Data Structure #1 Professor I. J. Chung.
Parallel Input/Output
More Devices: Control (Making Choices)
Lab02 :Logic Gate Fundamentals:
COMP211 Computer Logic Design Introduction to the DE2 Board
Specifications What? Not how!.
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
Function Overloading C++ allows us to define functions that have the same name but different sets of parameters This capability can be used to define similar.
The centronics port Interfacing to a PC.
CS 206D Computer Organization
Lab. 1 – GPIO Pin control Using information ENEL353 and ENCM369 text books combined with Blackfin DATA manual.
Input Laboratory: GPIO Pin control needed to have the Blackfin accept your commands Re-uses information from ENEL353 and ENCM369 courses and text books.
Keypad Source: under under
Lab 1. Introduction to the DE2 Board
Keypad Source: under under
Lecture 4. Introduction to the DE2 Board
A modular robot for use in the RoboSumo lab
Presentation transcript:

Many students find it difficult understanding the concept of Object Oriented Programming (OOP) Lack of exciting labs leads to a loss of interest Created with partial support from the National Science Foundation’s Division of Undergraduate Education through CCD grant DUE and ILI grant DUE MIPPET has 4 switches, 4 LED's, a High Current Output, an A/D converter and two communication ports

User Code to control MIPPET MIPPET Class MIPPET

Object Class provides a high level coding structure for the user Mippet (int port); // Precondition: Mippet must be connected to parallel port at // address "port" (can be 0x378, 0x278 or 0x3BC) // Postcondition: Mippet is initialized to all items off // (status port bits 0-3 low, 4-7 high) void ReadSwitches (bool & switch0, bool & switch1, bool & switch2, bool & switch3); // Precondition: None // Postcondition: Sets the switch parameters to 0 or 1 depending on // whether the switch is pressed or not at the instant // the function call is made (0 = not pressed, // 1 = pressed) // Returns: None

MIPPET connects to the parallel port of a computer All inputs and outputs are through pins on the parallel port To use a port, we need to know its base address and the semantics of its usage provided by the data sheet

MS C/C++ provides two functions to write/read from the port: inp & outp e.g. The parallel port has a base address of 0x378. To read the Status Port (located at the base address+1): int x; x = inp(0x379); To set or clear a bit, need to create a mask

Say we want to set Logical Output 3 high. We know that Logical Output 3 is connected to pin 4, which is bit 2 on the status port Since we want to modify bit 2, our mask will be = 0x04 But we cannot just write 0x04 ( ) to the port as this will clear all other bits.

Must read in the existing value of the data port e.g. x = inp(0x378) We take this value and “OR” it with our mask (0x04) “OR”ing this mask with the value read from the status port sets bit 2 and keeps all other values unchanged. e.g. x = OR

Talking to devices is basically a matter of reading/writing to ports Abstraction is a wonderful thing! * Hiding * Device changes, client does not notice

QUESTIONS?