E11 Lab 3
Procedures
2008
Procedure:
Part 1: The touch screen
On the I/O box:

connect Ground and +5V to the corresponding places on the touch screen
apparatus:

Make the following measurements (using a voltmeter):
- Measure and record the +5V coming from the IO board.
- Set P0.0 input to 0V (logic 0 - low voltage)
- measure and record the voltage on pin 3 of the 74HC125
(one of the two integrated circuits on the board connected to the touch
screen), this is voltage on right side
of the display (this should be near 5V - refer to prelab),
- measure and record the
voltage on pin 6 of the 74HC125, this is voltage on left side (this
should be near 0V),
- measure and record
the voltage on C1 when the screen is not being touched,
- measure the voltage on C1 as you touch the screen in the twelve
locations that exist at the intersection of the heavy lines on the graph
paper behind the screen (note, each of the labels is one of the heavy
lines):

Fill in a table like the one below.
|
Table 1 |
left |
mid-left |
mid-right |
right |
| top |
|
|
|
|
| middle |
|
|
|
|
| bottom |
|
|
|
|
- What pattern do you see? Is this what you expected?
- Set P0.0 input to +5V (logic 1 - high)
- measure and record the voltage on pin 8 of the 74HC125, this is voltage on
the top of the display,
- measure and record the voltage on pin 11 of the 74HC125, this is voltage on
the bottom,
- measure and record the voltage on C0 when the screen is not being
touched,
- measure the voltage on C0 as you touch the screen in the twelve
locations shown (fill in a table like the one below).
|
Table 2 |
left |
mid-left |
mid-right |
right |
| top |
|
|
|
|
| middle |
|
|
|
|
| bottom |
|
|
|
|
- What pattern do you see? Is this what you expected?
Now, hook up the C0 output to the Chan 0 input on the I/O box (this is one of
the A/D inputs). Connect C1 to Chan 1. Connect P0.0 on touch screen
board to P0.0 on I/O box (this is
a digital output from the I/O box); make sure to disconnect this from ground or
+5V. (Some
useful MatLab code snippets - Note: the code is (for
the most part) uncommented. If you choose to use any of it, please add
comments, as appropriate, before turning it in.)
- Program 1:
- Write a program that:
- Initializes the data acquisition (or DAQ),
- sets P0.0 low,
- starts a loop that runs for 10 seconds, and within the loop reads the value from Chan 1 and displays it.
- closes the data acquisition
- Make sure you are happy with the results of the program.
- Program 2:
- Write a program that:
- Initializes the data acquisition,
- sets P0.0 high,
- starts a loop that runs for 10 seconds, and within the loop reads the value from Chan 0 and displays it.
- closes the data acquisition
- Make sure you are happy with the results of the program.
- Program 3:
- Write a program that:
- Initializes the data acquisition
- starts a loop that runs for 10 seconds, and within the loop:
- set P0.0 and read inputs to get the x and y location of the
stylus
- plot the location on the screen
- closes the data acquisition
- Program 4 (this is the only program that needs
to be turned in).
- Write a program that allows you to write your name
(or anything else) on the screen -
you should be able to do a simple modification of "Program 3" wherein
the dots are not erased.
Hint: What
does the MatLab command "hold on" do?
You may also need "hold off."
- Extra credit (complete any or all of the
following):
- Change the code so it doesn't display the circle when the screen is not being
touched.
- Connect the dots with a line.
- Average several consecutive values (e.g., the last 5 or 10 or ...) so that
there is less jitter.
Part 2: Building a circuit permanently
For this part of the lab you will build a simple circuit with a
couple of oscillators. We will analyze it next week. Ed Jaoudi will help you solder together a version of
the circuit shown below. Directions are here.
pdf version of circuit diagram.
Before You Leave
Make sure the lab is cleaned up, and that you have all the information you
will need for your report.
email me with any comments on how to improve the
information on this page (either presentation or content), or to let me know if you had
any particular difficulties with this lab.
Back