Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Lab Six: Input Capture, Pulse Width Modulation (PWM) and μC/OS-II - Prof. Bradley J. Bazui, Lab Reports of Microcomputers

A laboratory experiment focused on using the input capture function and pulse width modulation (pwm) of the ect module on a 9s12dp512 microcontroller. Students will develop c programs to measure signal periods and pulse widths, generate periodic output signals, and implement real-time interrupts using μc/os-ii. Tasks to verify waveforms using an oscilloscope and record data for lab reports.

Typology: Lab Reports

Pre 2010

Uploaded on 09/17/2009

koofers-user-935
koofers-user-935 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Lab Six: Input Capture, Pulse Width Modulation (PWM) and μC/OS-II - Prof. Bradley J. Bazui and more Lab Reports Microcomputers in PDF only on Docsity! Laboratory Six Input Capture, Pulse Width Modulation (PWM) and μC/OS-II Objectives:  1. To use the Input Capture function of the ECT Module to measure the period time and the pulse width of a digital signal. 2. To use the PWM Module to generate a periodic digital output signal with a programmable duty cycle. 3. To use some of the facilities provided by μC/OS-II. Task One:  Develop a C program that will take measurements of the pulse width and the period time of a periodic digital input signal. Set up a digital Pulse Generator for a TTL compatible signal of approx. 2 KHz frequency. Verify the signal waveform, frequency, high and low periods using an oscilloscope and make sure that the signal doesn't drop below 0V, and doesn't rise above 4.8V. Record these data for your Lab Report. Then connect the signal through a suitable buffer chip to the Port T pin specified in the Prelab Assignment, or will be determined by your Lab TA. i. Use the input capture function of the 9S12DP512 ECT Module to measure the signal period time, and the width of the high and low periods, respectively. Store the results in memory locations. By using your calculator compare these results to measurements taken by a logic analyzer and explain any differences. Your program should use the corresponding Timer Channel interrupts to accomplish this task. Use a logic analyzer to record the input waveforms for your lab report. ii. Now gradually increase the frequency of the input signal to find that signal frequency at which the system collapses (i.e., your program results become inconsistent with measurements done by the help of a logic analyzer). Use a logic analyzer to capture the input waveforms for your lab report. Task Two:  Develop a C program to generate a periodic digital output signal using the PWM Module. The selected Port P bit, the duty cycle value and the approximate signal frequency will be given in the Prelab Assignment, or will be determined by your Lab TA. The Port P output signal is to be buffered by a suitable buffer chip. Use a logic analyzer to verify your results and record the waveforms for your lab report. Explain any differences. Task Three:  Implement the real-time interrupt timing example found at the end of the Chap 06 Notes in C. Task Four:  You are required to develop two different tasks (threads) within μC/OS-II for this task (your program should carry on them simultaneously):
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved