Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interfacing Project. Computer Controlled Car Left Headlight – D0 Right Headlight – D1 Left Taillight – D2 Right Taillight – D3.

Similar presentations


Presentation on theme: "Interfacing Project. Computer Controlled Car Left Headlight – D0 Right Headlight – D1 Left Taillight – D2 Right Taillight – D3."— Presentation transcript:

1 Interfacing Project

2 Computer Controlled Car Left Headlight – D0 Right Headlight – D1 Left Taillight – D2 Right Taillight – D3

3 The Wood Car Project Steps: 1) Wire-wrap four LED / resistor pairs 2) Attach the wires to the car 3) Connect the wired pairs to the D-Sub connector 4) Write your program 5) Enjoy hours of staring at the model flash.

4 Paper Cars

5

6 Part I : Materials Materials: - wooden car - 4 x 220 Ohm resistors - 4 LEDs - Parallel Port Cable Thumb tacks, tape

7 Step 1 : Wire Head Lights Left Headlight – D0 Right Headlight – D1

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

9 Step 1 – Wire Wrapping Wrap –’ve lead Trim ends of wires Fold wires flat

10 Step 2: Wire Taillights Left Taillight – D2 Right Taillight – D3

11 Wiring an LED +’ve, Long Lead

12 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

13 19867543213121110 222119201817161525242314 Step 3 – The D-Sub Connector

14 Step 4 – Wiring the lights

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

16 Binary on the Parallel Port parallelput(0) parallelput(1) parallelput(37) parallelput(255) 00000000000000010001010111111111 The integer parameter is translated into binary and each bit corresponds to one of the data pins on the parallel port.

17 Test your interface Once you’ve got the wires connected to the D-Sub connector, you can test the interface. Load the “Simple Paper Car Interface.t” program found on your CD. Try running the program and verify if your interface is correct.

18 Sample Program #1

19 Sample Program #2

20 Student GUIs

21 An Alternative: Wire-Wrapping You do not have to use breadboards for your interfacing projects. You can use wire-wrapping to connect your different components together. We’re breaking the rules of conventional wire-wrapping.

22 Setting up the car Left Headlight – D0 Right Headlight – D1 Left Taillight – D2 Right Taillight – D3


Download ppt "Interfacing Project. Computer Controlled Car Left Headlight – D0 Right Headlight – D1 Left Taillight – D2 Right Taillight – D3."

Similar presentations


Ads by Google