DOC PREVIEW
PSU EE 200 - ps7

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 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 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EE 200 Problem Set 7 Cover Sheet Spring 2014Last Name (Print):First Name (Print):ID number (Last 4 digits):Section:Submission deadlines:• Each EE 200 student must complete the circuit in problem 25 prior to attending Laboratory #14. At thebeginning of Laboratory #14, each student must show the completed circuit to the instructor to receive agrade for problem 25. As the instructor may ask you to verify operation of the circuit, you must bring yourmyDAQ and test leads to Labo ratory #14.• Turn in the written solutions for problems 26 through 28 by 4:00 pm on Friday March 7 in the homeworkslot outside 121 EE East.Problem Weight Score25 2526 2527 2528 25Total 100Problem 25: (25 points)As a first step towards using the Micro chip Technology dsPIC33EP64MC502 microcontroller, construct the circuit inFigure 1 that includes a voltage regulator a nd a circuit for interfacing the mi crocontroller to the PICkit 3 Program-mer/Debugger. In addtion to this problem set, the compressed file ps7.zip contains data sheets for the LM2937-3.3voltage regulator and dsPIC33EP64MC502 microcontroller, as well as the user guide for the PICkit 3 in-circuitDebugger/Programmer. Before constructing the circuit please complete the following steps.• Read the voltage regulator data sheet. Note the TO-220 package connection diagram on page 2 and theappli cation circuit diagram on page 8. The connection diagram identifies the unregulated input, regulatedoutput, and ground terminals on the device. The comments appearing under the schematic on page 8 explainsthe necessity for using a 0. 1 µF input capacitor and a 10 µF output capacitor.• The PICkit 3 is an essential tool for programming and debugging microcontroller circuits in EE 200. ReadChapters 1 a nd 2 of the PICkit 3 User’s Guide.– Figure 1-1 on page 14 and Figure 1-2 on page 15 specifies the location of pin 1 of the PICkit 3 Program-mer/Debugger 6-pin connector.– Table 2-1 on page identifies the si gnals on the PICkit 3 Programmer/Debugger connector.– Figure 2-4 on page 20 shows the standard circuit for connecting the PICkit 3 Programmer/Debugger toa target mi crocontroller.• Read pages 1 through 28 of the dsPIC33EP64MC502 micro controller data sheet.– The pin diagram for the dsPIC33EP64MC502 microcontroller appears on the bottom of page 5.– Pinout descriptions appear in Table 1-1 on pages 24 through 26.– Sections 2.1 through 2.4, appearing on pages 27 through 28, discuss the basic connection requirements.Figure 1 shows the required circuit for all microcontroller exercises in EE 200. The dsPIC33EP64MC502 microcon-troller requires a 3 .3 V power source while the myDAQ provides a 5 V supply. The LM2937-3.3 voltage regulatorcircuit in Figure 1 regulates the 5 V supply from the myDAQ down to 3.3 V for the microcontroller. Consult theLM2937-3.3 specification sheet to identify the input, ground, and output pins of the voltage regulator. Note thatthe 10 µF electrolytic capacitor is polarized. The interf ace circuit uses the microcontroller data I/O (PGED2) andclock input (PGEC2) on channel 2 for data communications wi th the PICkit 3 Programmer/Debugger. Connectthe 6-pin header for the PICkit 3 Debugger/Programmer using the pin diagram in Figure 1. Observe that the pinlengths on opposite sides of the header differ. Place the longer pins into the protobo ard so that the weight of thePICkit 3 Debugger/Programmer does not detach the header from the protoboard. Slides 57 and 58 of L ecture 7show photographs of the 6- pin header and an attached PICkit 3 Debugger/Programmer.During Laboratory #14 the instructor will demonstrate how to write a program that sets the logic level on pin 3(port A1) to that observed on pin 2 (port A0 ). In addition to the basic circuit connections in Figure 1, also includethe connections in Figure 2 that allow you to set the logic level on pin 2 using a tactile switch and display a logiclevel on pin 3 using a LED.At the beginning of Laboratory #14 the instructor will verify that each student has completed the circuits in Figures 1and 2. The instructor may verif y operation of the circuits by using your myDAQ to measure the voltage at pins 2 and28 of the dsPIC33EP64MC502, or pins 1 and 2 of the 6 pin header required for the PICkit 3 Debugger/Programmer.Figure 1: Basic connections for all EE 200 microcontroller exercises.Figure 2: Additional circuit connections for the microcontroller exercise in Laboratory #14.Problem 26: (25 points)Consider the C code in Figure 3 for the dsPIC33EP64MC502 microcontroller. Justify your answer to each of thefollowing questions using one or two short sentences.1. (4 points) Specify the port and lines used for digital input.2. (4 points) Specify the port and lines used for digital output.3. (6 points) Why is it not necessary to set the ANSEL register for two of the f our digital I/O lines?4. (6 points) Specify the relationship between the digital input and output lines when the Do-While-Loop isexecuting.5. (5 points) Specify the conditions of the input lines that will cause the program to exit the Do-While-Loop.Figure 3: C code for digital input/output using the dsPIC33EP64MC502 microcontroller.Problem 27: (25 points)In a future exercise you will w rite LabVIEW code tha t enables the myDAQ to write messages to the LCD module,as shown in Lecture 7 Slide 3. As a starting point, this problem considers a subVI that writes a single nibble, whichmay represent either an instruction or character data, to the LCD display. Figure 4 shows the connections betweenthe myDAQ and the LCD module. The myDAQ lines DIO0 and DIO1 set the Register Select (RS) and Enable(E)lines on the LCD module, respectively, while lines DIO4 to DIO7 set the upper nibble of Instruction/Data on theLCD module. The directory LabVIEW contains the subVI LCD Write Nibble.vi shown in Figure 5 and a customcontrol Reg ister Select Control.ctl that are used to write data from the myDAQ to the LCD module. In additionto the R egister Select control, another input to the subVI is an unsigned 8-bit integer control labeled Nibble thatrepresents the data to be written to lines D4 through D7 on the LCD m odule.Figure 4: Connections between the myDAQ and LCD module.Figure 5: SubVI for writing a nibble to the LCD module using the myDAQ.1. (4 points) Is the custom control Register Select Control.ctl a Control, Type. Def, or Strict Type Def.? Ina single sentence, state how you determined your answer.2. (4 points) What is the data type of the


View Full Document

PSU EE 200 - ps7

Download ps7
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 ps7 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 ps7 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?