1 / 11

Interfacing Introduction

Interfacing Introduction. Interfacing Overview. Computer. Peripheral. Interface. Wires ICs Resistors Capacitors Transistors Connectors. LEDs Motors Lights Robots Joystick Music Box. Parallel Port Pinout. Graphic from http://www.doc.ic.ac.uk/~ih/doc/par/. Output Table.

adin
Download Presentation

Interfacing Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Interfacing Introduction

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

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

  4. Output Table

  5. Input Table

  6. The Programming

  7. Turing: Preparing for Interfacing • Turing is already prepared for interfacing with the parallel port • No preparation necessary!

  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. Turing: Turning Off the LED • Parallelput(0)

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

  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

More Related