Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro. Interfacing & Electronics 1 Interfacing Introduction.

Similar presentations


Presentation on theme: "Intro. Interfacing & Electronics 1 Interfacing Introduction."— Presentation transcript:

1 Intro. Interfacing & Electronics 1 Interfacing Introduction

2 Intro. Interfacing & Electronics 2 Interfacing Overview Computer Interface Peripheral Wires ICs Resistors Capacitors Transistors Connectors LEDs Motors Lights Robots Joystick Music Box

3 Intro. Interfacing & Electronics 3 Parallel Port Pinout Graphic from http://www.doc.ic.ac.uk/~ih/doc/par/

4 Intro. Interfacing & Electronics 4 Output Table Pin #LabelBit Value 2D02 0 = 1 3D12 1 = 2 4D22 2 = 4 5D32 3 = 8 6D42 4 = 16 7D52 5 = 32 8D62 6 = 64 9D72 7 = 128

5 Intro. Interfacing & Electronics 5 Input Table Pin #LabelBit Value 15S32 3 = 8 13S42 4 = 16 12S52 5 = 32 10S62 6 = 64 11/S72 7 = 128

6 Intro. Interfacing & Electronics 6 The Programming

7 Intro. Interfacing & Electronics 7 Turing: Preparing for Interfacing  Turing is already prepared for interfacing with the parallel port  No preparation necessary!

8 Intro. Interfacing & Electronics 8 Turing: Turning On the LED  Parallelput(value)  Parallelput(1) turns on the 1 bit (D0)  Parallelput(255) turns on all bits (D0-D7)

9 Intro. Interfacing & Electronics 9 Turing: Turning Off the LED  Parallelput(0)

10 Intro. Interfacing & Electronics 10 Turing: Flashing the LED loop parallelput (1) delay (250) parallelput (0) delay (250) end loop

11 Intro. Interfacing & Electronics 11 Turing: LED Walking loop % loops up for i : 0.. 7 parallelput (2 ** i) delay (500) end for % loops down for decreasing i : 6.. 1 parallelput (2 ** i) delay (500) end for end loop


Download ppt "Intro. Interfacing & Electronics 1 Interfacing Introduction."

Similar presentations


Ads by Google