CSE466 | Class Schedule | Lab Updates | Syllabus | Web Resources | Final Project | Lab 8 | Lab 7 | Lab 6 |    | Email Archive | Hardware Lab

CSE466-02au Lab Assignment 3

Objectives

After this lab you should know:

Background

Tasks

  1. Experimenting with the Logic Analyzer


  2. Reading a value from the potentiometer with the ADC

    1. Connect the Potentiometer to ADC0. Ensure that AVCC is correctly connected
    2. Write code to read the ADC0 value and display the 4 MSBs on your hex display. This is for debugging the conversion process. The numbers should change as you turn the pot. Use the oscilloscope to watch the input to ADC0 while you turn the pot.
    3. Next, write code to control the speed of counting (lab 2 code) on your hex display. Your code should periodically sample the ADC, and use the result to set the timer interval to change the count rate from 1/second to 15/second. You code should use the up/down and start/stop buttons, as in Lab 2.

  3. Ramping the counter

    1. We want the count rate of our lab 2 code to start from zero (1 step/second) and slowly ramp up to maximum (15 steps/second). Stop should slowly ramp down to zero. The ramp time should be approximately 4 seconds.Minimum, Maximum, and Rate should all be set with declared constants so that they can be changed later. Don't wire values into your code. A linear ramp is sufficient.
    2. Reverse should ramp to zero, change the direction, and ramp back up to maximum. Remember State Machines from CSE370? You need to build a state machine to control this ramping and start-stop and direction.

  4. Stepper Pattern

    You will hook up ULN2003 and the stepper motor in Lab 4.
    1. Using PC4, PC5, PC6, and PC7 as outputs, demonstrate stepping and half-stepping patterns using the potentiometer to set the Maximum speed, and the switches and your ramp code to control the process.Ensure that your logic levels are correct for driving the ULN2003, which inverts the signals. Use the logic analyzer to view your patterns.

Deliverables

  1. Experimenting with the Logic Analyzer

  2. Reading a value from the potentiometer with the ADC

  3. Ramping the counter

  4. Stepper Pattern


Questions/comments can be directed to:
Instructor: bruceh
Staff: cse466-staff
Webmaster: cse466-webmaster
 CSE466 | Class Schedule | Lab Updates | Syllabus | Web Resources | Final Project | Lab 8 | Lab 7 | Lab 6 |    | Email Archive | Hardware Lab