EE 476: Laboratory 3

Cricket-call generator.

Introduction.

You will construct a cricket-call generator which will produce audio output of a simplified cricket call. A cricket call may be very complex, but we will limit ourselves to the following form.

  1. A call is made up by repeating indefinitely a chirp and a silent period. If the duration of the silence is zero, the call is refered to as a trill.
  2. A chirp is made up of a certain number of syllables with specific duration and repitition interval.
  3. A syllable is made up of a squarewave burst at a certain frequency.

The image below summerizes the definition ( from bionb 420).


Procedure:

You will need to connect the switches to PortB of the mcu so that you can use four switches. One bit of PortD, perhaps bit 6 (which happens to be adjacent on the connector to ground), will be used to drive an earphone.

You will need to figure out how to generate a variety of time delays and durations. I suggest one of the following, but you may use any scheme you want.

Scheme 1

Scheme 2:


Assignment

  1. Write a program which implements a cricket-call generator with the following specifcations:

  2. Demo this program to a staff member. Show that all specifications are met.

  3. Your written lab report should include:

     


Copyright Cornell University December 1999