Question: Objectives 1. Students will learn how basic IO programming for the AVR chip and implement simple programs that turn on and off LEDs and read
Objectives
1. Students will learn how basic IO programming for the AVR chip and implement simple programs that turn on and off LEDs and read switches.
2. Students will load the final programs on the development board to verify its functionality.
You will write three assembly programs:
Program 1 IO Ports as outputs Program 1 should sequentially turn on and off the LEDs connected to PORTB. The LEDs should light up in a rotating fashion, one at a time and cycling forever. The cycle should progress every 1 second.
Program 2 IO Ports as inputs Program 2 should monitor all the buttons on PORTB and when a button is pressed, the corresponding LED should light up on the PO RTA LEDs. For example if the button connected pin PB0 is pressed, then the LED connected to pin PA0 should light up.
Program 3 Monitoring a button Program 3 should monitor the button connected to pin PB0 and when pressed, the program should flash the PORTA LEDs 5 tim es with 500ms in be tween each blink.
Extra Credit Create a program that flashes the LEDs on PO RTA. Use two buttons to control the speed the LEDs flash. Pressing one button should incr ease the blinking sp eed and pressing the other button should decrease the blinking speed.
You must configure the Easy AVRv7 board as follows:
Program1
o Configure SW10 to enable the PORTB LEDs
o Configure PORTB so that all pull ups/downs are disabled
Program2
o Configure SW10 to enable the PORTA LEDs
o Configure PORTB so that all pull ups/downs are disabled
Program3
o Configure SW10 to enable the PORTA LEDs and disable PORTB LEDs
o Configure PORTA so that all pull ups/downs are disabled
o Configure PORTB do that PB0 has an external pull down enabled
Exercise
1. Create an assembly project in Atmel Studio and enter your code into the project
2. Build the project and make sure there are no errors
3. Load the project on the EasyAVR v7 board a. In the programming window, make sure the AVR is set to use External Clock for Clock Source
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
