

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A laboratory experiment for creating periodic signals using programmable timers and the output compare function on an ect module. Students are required to write c programs to generate ttl-compatible output signals, design a periodic waveform generator, and load the program in the on-chip flash memory. The document also discusses the advantages and disadvantages of using built-in timer hardware versus software delay loops.
Typology: Lab Reports
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Objectives:
i. To use programmable timer overflow interrupts to create program delays
ii. To use the Output Compare function to generate a periodic digital output signal
Task One
Create a program that flashes a LED at a given frequency on a bit of a selected port using Timer Overflow ( TOF ) interrupts. All details including the required timing and the means to accomplish this task will be specified in the Prelab Assignment, or will be determined by your Lab TA. The program should be developed in C. Use a logic analyzer to verify your results and record the waveforms for your lab report. Explain any deviations from the specifications.
Task Two
Develop a C program to generate a TTL compatible periodic output signal by using the Output Compare function of the ECT Module. The actual bit of Port T , the frequency and the duty cycle of the output signal, respectively, will be given in the Prelab Assignment, or will be determined by your Lab TA. The program should be interrupt driven. Use a logic analyzer to verify your results and record the waveforms for your lab report. Explain any deviations from the specifications.
Task Three
Design a periodic waveform generator as follows: the output frequency and the duty cycle will be determined by the status of two input signals. The status of the input signals should be tested periodically. The approximate period time for the tests should be based upon Timer overflows. The Output Compare function should be used to generate the output signal. The program should be developed in C. All the necessary specs for this task will be given in the Prelab Assignment, or will be determined by your Lab TA. Use a logic analyzer to verify your results and record the waveforms for your lab report. Explain any deviations from the specifications.
Task Four
Repeat Task Three but now load your C program in the on-chip Flash Memory. Please refer to the Tutorials on Flash Programming posted on the Class Web Page. Demonstrate the correct execution of Task Three without the BDM Module.
In your Lab Report discuss the advantages and disadvantages of using built-in programmable timer hardware, rather than using software delay loops.
All numerical set up values should be justified. You are to turn in logic analyzer screenshots for signal waveforms, your schematic diagram complete with IC part and pin numbers and H (or H2) connector pin numbers. The programs should be documented by hard copies of your .c files and compiled list files. Your code should be properly commented on for full credit.