CS/ECE 5780/6780 Lab #7Spring 2010Davis, Atcitty, LeeLAB #7: Frequency MeasurementThe Lab write-up is due to your TA at the beginning of your next scheduled lab. Don’t putthis off to the last minute! There is pre-lab work to complete before the start of the next lab.NO LATE LAB REPORTS WILL BE ACCEPTED.1 Objectives• To gain experience using input capture and output compare to measure an inputsignal’s frequency.2 BackgroundIn this lab, you are going to experiment with frequency measurement on yourmicrocontrollers. You will need to be able to measure both the frequency and the duty cycleof a given square wave input. You should make use of the LCD display to display thefrequency of a square ware input on the top line of the LCD and the duty cycle of the samesquare wave on the bottom line of the LCD. After each frequency measurement, you shouldtransmit the measurement out to the LCD display. You should be able to measure between20 Hz and 20 kHz with the resolution of 1 Hz. The LCD display should be updatedapproximately every second.3 Pre-labYou should have at least a basic version of your frequency measurement code writtenthough it need not be thoroughly debugged.4 Tasks1. Use a frequency generator to test your frequency and duty cycle measurement code.Check-off your working frequency measurement device with your TA.Note: The duty cycle of the waveform generators in the labs is changeable from 20%-80%. The instructions are as follows:1. Hit the squrewave button.2. Hit (shift)(%duty)3. Hit (enter number)4. Enter the desired duty cycle.5. Hit enter again.The manual is available in the lab if you have any questions about setting the duty cycleof the waveform generator.5 WriteupInclude the following items:1. A printout of your commented code.2. Any problems encountered in the
View Full Document