EECEC 322 Lab 7 and Lab 8 - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

EECEC 322 Lab 7 and Lab 8

Description:

Please Note Lab 8 is scheduled for Tuesday March 4th 6:00 PM. Objective ... position represented as an int, to an ASCII string that is printable to the PC ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 10
Provided by: Gar13
Category:
Tags: eecec | lab | printable

less

Transcript and Presenter's Notes

Title: EECEC 322 Lab 7 and Lab 8


1
EE/CEC 322 Lab 7 and Lab 8
  • 8051 Stepper Motor
  • Part 1 no report
  • Part 2 report Due 3/6/08
  • This report counts 20 points
  • Please Note Lab 8 is scheduled for Tuesday March
    4th 600 PM

2
Objective
  • Operate a Stepper Motor using the 22V10 as the
    Step State Machine use the 8051 to produce the
    step clock for the 22V10 and control direction.
  • Build the 22V10 code in VHDL to operate the
    stepper motor
  • Use Lab 5 for this
  • Use the 8051 to generate a variable rate step
    clock
  • Use Timer 0 for this
  • Build a command parser that responds to the
    commands
  • R (or r) turn right
  • L (or l) turn left
  • S (or s) stop
  • numbers 1-0 to set step speed
  • 1 1 step per second
  • 2 2 steps per second
  • 0 10 steps per second
  • Once per second, output to the PC, the stepper
    position in counts

3
Prelabs
  • Prelab 7 design the software (C) required for
    the Lab 7 portion of the deliverables (slide 8)
  • Prelab 8 design the software solution required
    for the Lab 8 portion of the deliverables (slide
    9)

4
Background
  • Lab 3 we wrote and tested VHDL code for operating
    a stepper motor assuming the state transition
    clock and direction inputs were provided by the
    8051
  • Lab 5 we operated the stepper motor but without
    enable and direction control. We will need to
    add these capabilities
  • Lab 6 we built a serial interface we will need
    to expand the serial capability

5
PLD Programming (this was done in lab 5)
  • If you have your PLD code from Lab 5, nothing
    further will need to be done here
  • The stepper motors have phase B and Phase C
    reversed in the wiring
  • You must reverse these two phases in VHDL code
  • The disable state must output phases A-D the
    logic 1 in order to shut off all the motor
    windings
  • The outputs of the 22V10 (Phases A-D) are
    inverted before they reach the stepper driver
    transistors
  • Your VHDL state outputs must also be reversed

6
8051 programming
  • Upon reset have the 8051 print an introductory
    message to the PC
  • This might include
  • your name
  • date
  • lab number
  • Program the Timer 0 ISR.
  • Lab 5 used an int to count interrupts, here you
    will need a variable (value set by the command
    parser) to determine when to toggle the clock pin
  • Program the serial interrupt to accept commands
    and send messages
  • The code that initiates sending status to the PC
    should be in main()
  • The command parser also should go in main()
  • You will need a function that converts the
    stepper position represented as an int, to an
    ASCII string that is printable to the PC

7
Needed code
  • From class, most of what you need is available
  • You will need a command parser An example has
    been provided in class
  • You will need a function that converts a signed
    integer to an ASCII string, much like printf()
    does when programming a PC console program.
    Again an example exists from class

8
Deliverables
  • Lab 7 portion
  • Design a software solution for the serial
    interrupt, timer interrupt, and main()
  • main() will require a
  • command parser
  • Send Status once per second
  • express these solutions in the form of flow
    charts
  • Demonstrate your serial communications including
    your binary to ASCII conversion routine

9
Deliverables Continued
  • Lab 8 portion
  • complete the lab by adding the stepper
    functionality and all the command options
  • Demonstrate proper operation of the Stepper Motor
  • Write your report include your deliverables
    from the Lab 7 portion
  • Include your design documentation with your
    report
  • The lab report will count 20 points (2 labs)
Write a Comment
User Comments (0)
About PowerShow.com