Project 1: Digital I/O
- All components of the project are due by February 27th at 5:00pm.
- Two person groups are required
Project Goals
At the end of this project, you should be able to:
- Create, compile, and download code to the Atmel Mega8, and
- Manipulate digital I/O lines,
- Produce regularly timed events.
Project Components
Part 1
- Implement an internal 4-bit counter.
- The state of the counter is indicated using 4 LED channels:
- Bit 0: Blue
- Bit 1: Yellow
- Bit 2: Red
- Bit 3: Green
- Each time the button is pressed down, the counter should increment exactly once. The counter rolls over to zero after 0xf (decimal 15).
Part 2
- Produce a musical tone using the speaker as long as the user continues to press the button. Note that tones can be produced by turning the speaker "on" and "off" at some frequency.
- The frequency of the tone should increase with each increment of the counter.
Things You Should Know
We are using the bion
boards for this project (so no hardware development).
- There are three debugging LEDs attached to PORTB, pins 0, 1, 2
- The blue LEDs are attached to PORTC, pin 5
- The piezoelectric speaker is attached to PORTD, pin 2
- Switch 1 is the reset switch (pushing it will cause the processor to reboot and restart your program)
- Switch 2 is attached to PORTD, pin 3. This pin will read 1 when the button is not pressed and 0 when it is pressed.
References:
What to Hand In
All components of the project are due by February 27th at 5:00pm.
- Group report: Turn in your documented code to the
project 1 digital dropbox on D2L (text format). Only hand in
one copy of code per 2-person group.
- Personal report: State the relative contribution of you
and your partner (in terms of percentage of effort) (text format)
Grading
- 50%: Project implementation
- 25%: Demonstration of working project (to either of the TAs or the
instructor). This demonstration is due at the same time as the
reports
- 25%: Internal documentation of the code
fagg [[at]] ou.edu
Last modified: Mon Feb 19 15:08:32 2007