EE 476: Laboratory 3

TV control and video clock.

Introduction.

You will construct a simple stopwatch which displays time on a television. There will be start, stop, and reset buttons to control it.


Procedure:

You will probably want to review the code examples given in Video Generation with AVR.
Use this example as a basis for your program.

Build the video DAC and connect it to the yellow connector on the TV using clip leads and a RCA phone jack. Make sure the TV is set to video input. Test the TV connection using one of the example programs on the video page.

Under the Project menu, choose Configure... , then in the Compiler tab. Set "Optimize for Speed", reduce the Data Stack size to 100 bytes, and turn off the "char is unsigned" option.

The power supplies on the TVs and development boards are NOT interchangable.


Assignment

  1. Write a C program which:
    1. Simulates a stopwatch with start, stop and reset buttons. The reset only works when the stopwatch is stopped. Note that it makes no sense to debounce the switches.
    2. Displays the elasped time, in minutes:seconds:100ths of a second (e.g. 032:24:80) on the TV screen in numeric form.
    3. The time should be accurate to 1/60 second with a maximum time of 1000 seconds.
    4. The button state should be checked 60 times/sec.
    5. There should be no flicker, image tearing, or other visual artifacts.

  2. Demo this program to a staff member. Show that all specifications are met by verifying the video waveform with an oscilloscope.

  3. Your written lab report should include:

     


Copyright Cornell University Jan 2003