ECE 3710 Lab 0 solution


Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment


5/5 - (1 vote)

The student should become familiar with the functions and capability of the Tektronix MDO3014 Mixed
Domain Oscilloscope and the Tiva C Series TM4C123GH6PM Microcontroller Data Sheet.
This lab serves as an introduction to logic analyzers (used for debugging and verification) and provides
practice in reading datasheets (the main way engineers become familiar with device components).
Proficiency in reading datasheets/technical literature and utilizing the information provided therein is an
essential skill for an engineer to possess.
 Download the TM4C123GH6PM data sheet from the course wiki.
 Download MDO3000 Series Mixed Domain Oscilloscopes User Manual from the course wiki.
 Review the ‘XYZs of Oscilloscopes’ primer available on the course wiki.
 Purchase a lab kit from the ECE store.
About the TM4C123GH6PM Microcontroller
Using the TM4C123GH6PM data sheet, answer the following questions (answers will be posted at the
end of the week). TIP: To efficiently move through the data sheet, have the table of contents open on the
left or right hand side of the PDF viewer.
1. A memory map is a convenient way to depict the memory addresses of registers and
descriptions of registers.
a. Which section describes Cortex-M4’s memory map?
b. What table number indicates the memory map of Cortex-M4 processor?
2. Each Peripheral has a specific memory address, what is the base memory address of GPIO_A
(general input/output port A)?
3. Each peripheral has a number of registers that control its functionality. For a given peripheral, it’s
often easier to use the offset of a register with respect to the peripheral base address rather
than the absolute address of the register. A peripheral’s registers and their associated offsets are
usually summarized in a register map.
a. Which section describes the General-Purpose Input / Output (GPIO) register map?
b. What is the table number for the GPIO register map?
4. The register map table in the TI documentation contains the name, offset, and description of a
register. Which register corresponds to the direction of a GPIO port? Write down the name of
this register, its memory offset, and the absolute address for port A of this register.
5. Click the page number of the GPIODIR register on the register map table.
a. What binary value corresponds to an output?
b. If pins 0, 4, and 7 were inputs, but the rest were outputs, what would the state of this
register (in binary values)?
c. What would be the state of this register using hexadecimal values?
6. Which timer is located at memory address 0x4003.2000?
7. Find the register map for General Purpose Timers. Which register is located at offset 0x068?
Provide a brief description of this register.
8. On this board, a few pins are wired together. Record the pins that are wired together. (Hint: look
in the Tiva™ C Series TM4C123G LaunchPad Evaluation Board User’s Guide Schematic
found on the Lab Supplements page)
Introduction to the MDO3014 Mixed Domain Oscilloscope
Read through the following sections of the MDO3000 Series Mixed Domain Oscilloscopes User Manual:
1. Get Acquainted with the Instrument (pages 36—53)
2. Appendix C: P6316 General-Purpose Logic Probe Information (pages 203–207)
3. Setting Up Digital Channels to Using MagniVu (pages 79—82)
4. Trigger Setup (pages 87—93)
5. Analyze Waveform or Trace Data (pages 122—130)
6. Save and Recall Information (p160—166)
Answer the following questions:
1. Name three potential uses for the logic analyzer.
2. A properly configured trigger will remove guesswork and chance from capturing the output
behavior of a signal.
a. Write down how you would configure the trigger to capture on a falling edge.
b. Write down how you would configure the trigger to capture on a rising edge.
3. How do you change the sample period of the logic analyzer?
a. Change the sample period to 200ns.
Set Up the Board
A. Open Keil uVision.
B. Download the lab0 zip file, unzip, and open SP.uvprojx under the ‘blinky’ directory.
C. Build the project. Project – Build.
D. Plug in the microcontroller (use the debug port). There is a switch near the top left which will
turn it on.
E. Flash the project to the board. Flash – Download.
F. Press the RESET button located on the microcontroller.
G. The program is now running.
Now the board is ready to use. What is the program doing? Press SW1 and observe the behavior of the
microcontroller. Now press SW2 and observe. Estimate the rate at which the lights are flashing.
Use the logic analyzer and triggers to measure the rate of the flashing light. DO NOT connect the logic
analyzer without talking with the TA first. Your board will burn out. Hint: The light power line is
connected to pin F1.
1. In order to connect the logic analyzer to your board, the Logic Probe must be connected.
2. Change the logic analyzer settings (Hint, refer to the ‘Setting Up Digital Channels’ section of the
scope user manual).
o Change the format so the analyzer only looks at pin 0 of the probe
o Trigger on 5ms
3. When you press either button, the light should flicker then move to a steady state. Use the logic
analyzer to obtain the flicker waveform for SW1. (Hint: use falling edge trigger)
o Obtain screenshot of the logic analyzer timing verification.
o Draw the waveform.
o Record the amount of time between flicker states (Hint: try both an automatic
measurement and the cursors [section ‘Taking Manual Measurements with Cursors’
pages 132–136])
4. Use the logic analyzer to obtain the timing for SW2. (Hint: use rising edge trigger)
o Obtain screenshot of the logic analyzer timing verification.
Using the Analog Comparator of the TM4C123GH6PM Microcontroller
The analog comparator will convert a voltage to a digital value. Read about these in chapter 19 of the
1. Open the project in the ‘comparator’ folder.
2. The project contains code which will turn on a light when the voltage on analog comparator C1-
(found in Table 19-1) rises above a certain level. What are the pin assignments for this
3. Chapter 19 gives information about the configuration of this peripheral. Which register stores
the information about internal reference?
4. Use the system viewer to Select Peripherals – System Viewer – COMP to show the analog
comparator registers. Run the program and observe the configuration of the register found in
step 3.
5. Using the information from the above register, determine the RNG value and the VREF value.
Finally, determine the actual internal voltage reference which will activate the light.
6. Test your answer with a voltage source. To avoid damage to your board, start the voltage at 0.
About Lab Reports
Lab reports are used for two purposes. One is to show your employer/grader what you have done. The
other purpose of a lab report is to serve as a reference manual in your future.
 Write down what steps were needed to perform a task.
 Take screenshots or pictures of procedures or results.
 Describe issues and solutions to them.
 Any other necessary knowledge – this is not an all-inclusive list of required items. You should fill
the lab report as full as necessary to show design decisions and procedures.
Read the “Guidelines for Lab Reports” page on the wiki for more pointers.