DOC PREVIEW
PSU EE 200 - ps9

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EE 200 Problem Set 9 Cover Sheet Spring 2014Last Name (Print):First Name (Print):ID number (Last 4 digits):Section:Submission deadlines:• Each EE 200 student must complete the circuits in problem 33 prior to attending Laboratory #18. At thebeginning of Laboratory #18, each student must show the completed circuit to the instructor to receive agrade for problem 33.• Demonstrate completion of problem 34 during the evening laboratory session on either Monday March 24 o rTuesday March 25 from 6:30 pm to 8:30 pm in 302 EE West. You must sign up for a ten minute slot usingSignUpGenius. You will receive an email message via your Penn State email address when the sign up sheet isavailable online at SignUpGenius. Slots are filled on a first-come, first-served basis.• Turn in the written solutions for problems 35 and 36 by 4:00 pm on Tuesday March 25 in the homework slotoutside 121 EE East.Problem Weight Score33 2034 3035 2536 25Total 100Problem 33: (20 points)A goal of Laboratory #18 is to realize a pul se width modulated (PWM) signal using the dsPIC33EP64MC502microcontroller using the C programming language and the myDAQ using the LabVIEW programming environment.Analog i nput channels 0 and 1 of the myDAQ moni tor the PWM signal from the myDAQ and microcontrollerrespectively. In addi tion, each PWM output drives an LED through a 330 Ω resistor. Every EE 200 student mustconstruct the circuits in Figures 1 through 3 and bring them to Laboratory #1 8. Details for completing the circuitin Figure 1 are available in Problem Set 7 Problem 2 5. At the beginning of Laboratory # 18 the instructor will verifythat each student has completed theses circuits.Figure 1: Basic connections for all EE 200 microcontroll er exercises.Figure 2: Additional circuit connections f or the microcontroller PWM circuit.Figure 3: Circuit for generating and observing PWM signals using the myDAQ.Problem 34: (30 points)Each EE 200 student must realize the finite state machine for robot navigatio n introduced in Problem Set 3 Probl em10 using the myDAQ, and demonstrate their circuit to the laboratory instructor during the grading session o n eitherMonday March 24 or Tuesday March 26 from 6:30 pm to 8:30 pm in 302 EE West. To receive full credit, your systemmust comply with the following specifications:1. Use the myDAQ signa l assignments i n Table 1 and schematic in Figure 4.Signal Designation Signal Description myDAQ I/O designationMLleft mo tor drive DIO 0MRright motor drive DIO 1SLleft sensor signal DIO 4SRright sensor signal DIO 5SBback sensor DIO 6Table 1: The myDAQ Digital I/O assignments.2. Use three tactile switches to g enerate the asynchronous reset SB, left-sensor hit SL, right sensor hit SRsignals.To reduce the possibility of electrical noise generating an erroneous input, the myDAQ digital input lines arepulled to the logic high state with a 27 kΩ resistor. To activate a g iven sensor, the user pushes the correspondingtactile switch and pulls the lo gic level at the myDAQ input to the low state.3. Implement the FSM in LabVIEW using Exercise 1 in Laboratory 15 as a guide.4. Specify the state using an enumerated type with the entries in Table 2. Create a type definition file that defineseach instance of the enumerated type usi ng a strict type definitio n.Items ValuesS1 0S2 1S3 2S4 3S5 4Table 2: Enumerated type for specifying states.Figure 4: Schematic diag ram.5. R ead and write to the myDAQ digital lines using the DAQm x VIs; do not use the NI ELVISmx VIs.6. R ead the front sensors SLand SRonce per second, and appropriately update the state and outputs.7. Poll the rear sensor SBevery 10 ms to realize an asynchronous reset that im mediately drives the state to S1and appropriately sets the moto r drive signals when the tactile switch representing the rear sensor is pressed.8. When realizing the finite state m achine, represent the front sensor signals SLand SRusing an integer as shownin Table 3, and wire this integer to the selector terminal on the inner case structure that determines the nextstate. Note that the Boolean variables SRand SLare logic high when the corresponding tactile switch ispressed.Input Intege rSRSL0SRSL1SRSL2SRSL3Table 3: Representation of front senor inputs using an integer.9. The front panel must have a single control, a stop button.10. The front panel must have seven indicators:• A Bo olean indicator corresponding to the input SL.• A Bo olean indicator corresponding to the input SR.• A Bo olean indicator corresponding to the input SB.• A Bo olean indicator corresponding to the output ML.• A Bo olean indicator corresponding to the output MR.• An enumerated type indicating the present state.• An integer indicator that i ncrements on each clock period when the inputs SLand SRare read. Initializethe starting value of the display to 0.During the project demonstration, the instructor will award points using the following criteria.1. (5 points) Each tactile switch and LED must be labeled with the corresponding signal, SL, SR, SB, ML, andMR. Use a post-it note or, alternatively, tape a piece of pa per to the wiring connecting the switch or LEDwith the appropriate signal label.2. (5 points) The LabVIEW front panel must have the control and indicators specified in the requirements above.3. (5 points) The LabVIEW code must follow the architecture in Labo ratory 15 Exercise 1 and use DAQmx VIsto read and write the myDAQ digital lines.4. (5 points) The LabVIEW VI must use a strict type definitions for each instance of the enumerated typespecifying the system state.5. (5 points) Pressing the rear button must return the system to state S1, with the corresponding output set,within 10 ms.6. (5 points) The system must correctly respond to the front sensor inputs SLand SR.Problem 35: (25 points)Consider the ci rcuit diagram in Figure 5 and the C code in Figure 6 for the dsPIC33EP64MC502 microcontroller.Justify your answer to each of the following questions using one or two short sentences.1. (2 points) When the program starts, is the LED initial ly on or off?2. (5 points) Complete l ine 35 in the code so that pushing the button triggers an interrupt.3. (5 points) Com plete li ne 37 in the code so that an interrupt occurs when the button is pressed, rather thanwhen it is released.4. (5 points) Complete l ine 44 in the code so that the LED turns off when an interrupt occurs.5. (5 points) Complete l ine 45 in the code.6. (3 points) If the user presses a nd releases the button o nce,


View Full Document

PSU EE 200 - ps9

Download ps9
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view ps9 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view ps9 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?