Title: Computer Engineering: Interfacing Activities Grade 12 Summer Institute 2002
1Computer EngineeringInterfacing
ActivitiesGrade 12Summer Institute2002
- Graham Smyth
- smythel_at_mnsi.net
2Computer Engineering Units
Grade 12 Five Hands-0n Units
- 1. Hardware
- 2. Networking
- 3. Integrated Circuits
- 4. Programming
- 5. Interfaces
3Breadboard
Top Rail Connected
Connected In Fives
Bottom Rail Connected
Divider
4Interfacing System Unit 5
Computer Interface Peripheral
- LED's
- Motors
- Lights
- Robots
- Wires
- ICs
- Resistors
- Capacitors
- Transistors
Wires
Software
5Hands-on Activities
- Motor Control
- Inputting Data
- Stop Lights
Student Project Demonstrations
- Intersection DC
- Intersection AC
- Music Box
6Parallelport(printer port)
Input I0 I3
Output D0 D7
13 12 11 10 9 8 7 6
5 4 3 2 1
25 24 23 22 21 20 19 18 17
16 15 14
Input I4
Grounds 18 - 25
View from back of Computer
7Stop Lights Interfaced
To Pins 2 3 4 18
8Stop Light Software Answer 1 Version 1
- parallelput (1) Red light
- delay (500)
- parallelput (2) Yellow light
- delay (500)
- parallelput (4) Green light
- delay (500)
9Stop Light Software Answer 2 Advanced Green
- parallelput (1) Red light
- delay (500)
- parallelput (2) Yellow light
- delay (500)
- for counter 1 .. 5
- parallelput (4) Green light on
- delay (300)
- parallelput (0) Green light off
- delay (300)
- end for
10Motor Control (physical)
From Pin 2
From Pin 18
11Motor Question
- Write a program that will
- Turn the motor ON for 3 seconds
- Turn the motor OFF for 2 seconds
- Turn the motor ON for 4 seconds
- Turn the motor off.
12Motor Software Answer
- parallelput (1) motor on
- delay (3000) for 3 seconds
- parallelput (0) motor off
- delay (2000) for 2 seconds
- parallelput (1) motor on
- delay (4000) for 4 seconds
- parallelput (0) motor off
13Input Wiring
I3 - Pin 13 Orange/Red I2 - Pin 12
Brown/White I1 - Pin 11 White/Orange I0 - Pin
10 Red/ Orange GND Pin 18 Gray/ White I4 -
Pin 15 White/ Blue
14Inputting Data Physical
10 11 12 13 15 18
15Inputting Software Assignment
Write a program that will continuously scan for
values input on the parallelport.
16Inputting Software Code
loop start of infinite loop put
parallelget returns a value from pins 10,
11, 12, 13, and 15. end loop end of loop
17Inputting Data Matrix
18Interfacing Activities
- Grade 12
- One byte
- LED intersection
- Stop Lights AC?
- Security systems
- Drag strips
- Music Boxes
- Latches
- Marquees
- GUIs
- Mouse control
19Addresses
smythel_at_mnsi.net www.classictech.on.ca www.holts
oft.com