Intro. Interfacing & Electronics 1 Interfacing Introduction
Intro. Interfacing & Electronics 2 Interfacing Overview Computer Interface Peripheral Wires ICs Resistors Capacitors Transistors Connectors LEDs Motors Lights Robots Joystick Music Box
Intro. Interfacing & Electronics 3 Parallel Port Pinout Graphic from
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
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
Intro. Interfacing & Electronics 6 The Programming
Intro. Interfacing & Electronics 7 Turing: Preparing for Interfacing Turing is already prepared for interfacing with the parallel port No preparation necessary!
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)
Intro. Interfacing & Electronics 9 Turing: Turning Off the LED Parallelput(0)
Intro. Interfacing & Electronics 10 Turing: Flashing the LED loop parallelput (1) delay (250) parallelput (0) delay (250) end loop
Intro. Interfacing & Electronics 11 Turing: LED Walking loop % loops up for i : parallelput (2 ** i) delay (500) end for % loops down for decreasing i : parallelput (2 ** i) delay (500) end for end loop