CS-328
Lab #1

Part 1: One Blinky

Using the blinking light code from the Instructables.com tutorial used to make your parallel port programming cable create an AVRStudio 4.0 project called Blink and compile the program. Connect your programming cable to the parallel port on the back of your lab PC and connect your battery pack to the power pins of your programmer and turn the power on. Open a command window on your PC and navigate to the directory where your .hex file is and using AVRDUDE down load the .hex file into your ATtiny2313. Remove the AVR chip from the programmer and move it to an empty part of your breadboard and connect the circuit (one LED between pins 8 and 10 of the chip) apply power to the chip and you should have a blinky light. Show this to the lab supervisor

Part 2: More Blinkies

Create a new AVRStudio project using count.c, compile the project. Download the .hex file into the 2313 as you did for part 1. Remove the chip from the programmer and move it to an empty part of the breadboard and connect 8 LEDs to PortB and a momentary contact switch to Port D pin D2. Apply power to the chip and verify that the system works as described in class. Show this to the lab supervisor.

Part 3: Smiley

Eight LEDs can be used to make a "smily" by using two LEDs for the eyes and the other 6 for the mouth. AVRStudio project called "smiley" that will be based on the code from Part 2. Use POrt B bit 0 and Port B bit 7 as the smily eyes and the other six LEDs for the smile. Mode one should display the smiley face all lit up, mode two should show the face lit up with the right eye blinking and mode 3 should show the face lit with the smile working like the "night rider" mode from Part 2. Comple your program, reprogram the AVR and demonstrate the working program to the lab supervisor.

Last updated 09/11/2008 - rvs