Introduction to Interfacing Projects Nareen Khan.

Slides:



Advertisements
Similar presentations
Interfacing Lab Part Guide. The Solderless Breadboard Rows along the top and bottom are connected horizontally along the length of the board Holes in.
Advertisements

Khaled A. Al-Utaibi Interfacing an LED The Light Emitting Diode (LED) Applications DC Characteristics & Operation Interfacing to.
Computer Engineering Activities Introduction to Interfacing Traffic Light Project SI 2003 Graham Smyth Yungsiow Yang Kevin Shea Jerry Dolata Ilana Smyth.
Interfacing Project. Computer Controlled Car Left Headlight – D0 Right Headlight – D1 Left Taillight – D2 Right Taillight – D3.
Assembly Manual Mike Fortney 04/09/2004 CricketSat Receiver.
CricketSat Receiver Assembly Instructions This is the instruction slides for the assembly of a receiver board. It would be a good idea to review soldering.
Lab7: Introduction to Arduino
» When you have completed this module you will know, what components do, what they physically look like and how they are represented in a circuit diagram.
Our First Real System.
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
Using the Board of Education Breadboard and Your Multimeter ENGR 120 Work in teams of two!
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
De la Rosa-Pohl ECE 1100 Introduction to Engineering Intro to LabVIEW: Programming for Symon University of Houston Diana de la Rosa-Pohl Len Trombetta.
Living with the Lab Using Your Arduino, Breadboard and Multimeter EAS 199A Fall 2011 Work in teams of two!
Assembly Manual Mike Fortney 04/02/2006 CricketSat Receiver.
CricketSat Receiver Assembly Manual Mike Fortney 06/26/2006.
Laboratory 5: Introduction to LabVIEW. Overview Objectives Background Materials Procedure Report / Presentation Closing.
Solar Energy Labs – Part 1 ENGR Today's Learning Objectives  After today's class, students will be able to: Describe and build both a calibration.
Digital Outputs 7-Segment Display
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Parallel Ports of PC Methods of interfacing Examples.
The Electronics Kit TEE2O1 Mr. Payne’s Period 5 Room S111.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
RM2C Understanding Connections on the Robot Control Board (RCB).
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
1 Applied Control Systems Technology. 2 Pin configuration Applied Control Systems.
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.
Computer Engineering Remote Controlled Car Project ACSE 2006 Graham Smyth Jerry Dolata.
Practice Problems to become familiar with circuits and circuit diagrams.
NPN Foundations of Technology NPN © 2013 International Technology and Engineering Educators Association, STEM  Center for Teaching and Learning™ Foundations.
Computer Engineering Activities The Joystick Project BEIT 2003 Graham Smyth Yungsiow Yang Jerry Dolata Kevin Shea Ilana Smyth.
Introduction to Electric Circuits. What is Electricity? No one really knows… A good definition for our class is: “Electricity is the flow of electrons.
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Interfacing Light-Emitting Diodes (LEDs) & Push Buttons to Microcontrollers.
Introduction to Electric Circuits. What is Electricity? No one really knows… A good definition for our class is: “Electricity is the flow of electrons.
Detection Circuit ENGR Lecture. Learning Objectives of Lab  Students will learn about –  Electronic circuit components  Building the binary.
Microcontrollers Module 3: Digital Display. 7 – Segment Display A seven-segment display (SSD), or seven- segment indicator, is a form of electronic display.
How an NPN Transistor Works
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
Detection Circuit ENGR Pre Lab.
Dual Sparkle Circuit Green connections are wires – they can be any colour. Make sure all + and - connections match up. Make sure the larger battery terminal.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Intro. Interfacing & Electronics 1 Interfacing Introduction.
Introduction to LabVIEW
Microcontroller basics Embedded systems for mortals.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Controlling an LED with a switch. 2 breadboard place where you can build electric circuits really quickly the magical breadboard.
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Introduction to Electric Circuits
Logic Gates Binary Day 3 PEOPLE 2016.
Assist. Prof. Rassim Suliyev - SDU 2017
Fundamentals of Computer Engineering
For further information
Introduction to Handshaking Communication with SSC-32U
COMP211 Computer Logic Design Introduction to the DE2 Board
Stop Light Lab 7 Winter Quarter.
Introduction to Handshaking Communication with SSC-32
How to avoid catching things on fire.
Roller Coaster Design Project
How Boolean logic is implemented
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
Welcome to Digital Electronics using the Arduino Board
How a PNP Transistor Works
How an NPN Transistor Works
Lab 1. Introduction to the DE2 Board
Lecture 4. Introduction to the DE2 Board
Series Circuits Makeup Lab
I/O Experiments Assignment 1.
2019 Investing Now Summer Program
Presentation transcript:

Introduction to Interfacing Projects Nareen Khan

Using Turing Command to send data to parallel port parallelput (x : int) The command sends 1 byte of data to the parallel port at a time. Using 1 byte (8 bits) we can represent 2 8 =256 different states. The 8 bits are sent along the Data pins on the parallel port (Pins 2-9, D0-D7)

Understanding the Parallel Port D7D6D4D5D3D2D1D0 Data Lines (D) used for output. Grounds Status Lines (S) used for input. Control Lines (C) may be used for input / output

Binary on the Parallel Port parallelput(0) parallelput(1) parallelput(37) parallelput(255) The integer parameter is translated into binary and each bit corresponds to one of the data pins on the parallel port. Unsure of your conversions? Try this utility.

What does the circuit look like? parallelput(0) Switch is open, no path, LED off parallelput(1) Switch is closed, path exists, LED on Voltage from parallel port 220Ω Pin 2 Pin 18

Breadboard Basics Connected vertically in blocks of 5 Connected horizontally

Light Emitting Diodes LED’s will only work if they are installed in the right direction. Here are three ways to tell which is the negative (-’ve) lead. 1) –’ve lead is shorter

Light Emitting Diodes LED’s will only work if they are installed in the right direction. Here are three ways to tell which is the negative (-’ve) lead. 2) Internal segment is larger

Light Emitting Diodes LED’s will only work if they are installed in the right direction. Here are three ways to tell which is the negative (-’ve) lead. 3) Flat side on lip Top View

Wiring an LED +’ve, Long Lead

Project Samples Traffic Intersection

Student GUIs

Student GUI’s

The Traffic Intersection Project Steps: 1) Wire six LED / resistor pairs on breadboard 2) Attach the wires to your model 3) Write your program 4) Enjoy hours of staring at the lights change

Step 1 – Wiring the lights +’ve, Long Lead -’ve, Short Lead

Step 2 – The D-Sub Connector 1)Attach your wires to the crimp pins. 2)Be sure to press the clamps down tight on the wire. 3)Push the crimped pin into the D-Sub Connector (it’s a tight fit). 4)Repeat for the other 7 wires.

Step 1 – Wiring the lights

Test your interface Once you’ve got the wires connected to the parallelport, you can test the interface. Try : parallelput(255) This should turn on all your lights.

Sample Program #1

Sample Program #Step 1 – Wire Wrapping

Make Use of the Tri-State Buffer – See the Handout

Making The Turing Program 1 Make a Program Header % % The "trafficIntersection" program % Course Code: ICS 3M1 % Instructor: Your Teacher % Date: April 25, 2007 % Initial Release % % This Program simulates a traffic intersection in graphics. It can also properly drive the actual % intersection by use of a parallel port and binary outputs.

Making The Turing Program 2 Create a User Defined Data Type type trafficState: % data type trafficState will store various components of traffic states. record timeWait : int % var for the time in that state binState : int % binary value of that state (more details see pin output state table NSPic : string % var for the state of the NS light EWPic : string % var for the state of the EW light end record

Making The Turing Program 3 Create a User Defined Data Type drawfillbox(0, 0, maxx, maxy, 54) % code for background colour % The 6 states are declared as an array of trafficState data type var trafficPattern : array of trafficState % Below contains the value of each of the states % timeWait: Green light - 5 sec. % Yellow light - 2 sec. % Both red light sec. % binaryStates in decimal: NS green - 1 % NS yellow - 2 % NS red - 4 % EW green - 8 % EW yellow - 16 % EW red - 32

Making The Turing Program 4 Note the binary States listed below drawfillbox(0, 0, maxx, maxy, 54) % code for background colour % The 6 states are declared as an array of trafficState data type var trafficPattern : array of trafficState % Below contains the value of each of the states % timeWait: Green light - 5 sec. % Yellow light - 2 sec. % Both red light sec. % binaryStates in decimal: NS green - 1 % NS yellow - 2 % NS red - 4 % EW green - 8 % EW yellow - 16 % EW red - 32

Making The Turing Program 5 Then Define Each Traffic Pattern in this manner… %NS Green EW Red trafficPattern(1).timeWait := 5000 trafficPattern(1).binState := trafficPattern(1).NSPic := "trafficgreen.bmp" trafficPattern(1).EWPic := "trafficred.bmp“ %NS Yellow EW Red trafficPattern(2).timeWait := 2000 trafficPattern(2).binState := trafficPattern(2).NSPic := "trafficyellow.bmp" trafficPattern(2).EWPic := "trafficred.bmp“ etc…

Making The Turing Program 6 Create a Procedure % procedure for loading the pictures in the different states procedure drawIntersection (NSFile : string, EWFile : string) Pic.ScreenLoad (NSFile, 250, 250, 0) Pic.ScreenLoad (EWFile, 100, 150, 2) Pic.ScreenLoad (NSFile, 250, 50, 0) Pic.ScreenLoad (EWFile, 400, 150, 2) end drawIntersection

Making The Turing Program 7 Finally, cycle through the lights… % Loop to make the cycle continuous for i : % Loop for each of the traffic states and giving drawIntersection the images to change for j : drawIntersection (trafficPattern(j).NSPic, trafficPattern(j).EWPic) parallelput (trafficPattern(j).binState) % send info to parallel port delay (trafficPattern(j).timeWait) % delay the amount of milliseconds indicated in traffic state end for

Making The Turing Program 8 Make Sure You Have These Graphics Files