Fundamentals of Embedded System Design and Programming
Assignments

Summer 2013


Home | Grading Info | Slides | Assignments | References
  1. Assignment 1, Due Thursday, August 8:

    Download and install Atmel Studio 6.1. Write a program to control the eight general-purpose LEDs on the STK600 board (LED0-LED7) using the eight general-purpose pushbutton switches (SW0-SW7). While a button is pressed, the corresponding LED should be lit.

    Demonstrate the assignment for me in class and submit your code to me through email at harris@ics.uci.edu. Please use the following subject line for your email, "Fundamentals, Assignment 1".

  2. Assignment 2, Due Thursday, August 22:

    Write a program which debounces switch SW0 and uses it to control LED0. Use a long bounce delay, so the LED should not change state unless the switch has changed position and it has been stable for 1 second.

    Demonstrate the assignment for me in class and submit your code to me through email at harris@ics.uci.edu. Please use the following subject line for your email, "Fundamentals, Assignment 2".

  3. Assignment 3, Due Thursday, August 29:

    Write a program which makes LED0 blink, and allows the rate of blinking to be controlled by pressing buttons SW0, SW1, and SW2.

    Pressing SW0 causes the LED to change state once every second. Pressing SW1 sets the blink rate to once every half second. Pressing SW2 sets the blink rate to once every quarter second. When powered on, LED0 should change state approximately once every second.

    You should implement this program using interrupts triggered by a timer. You should have an interrupt service routine (ISR) which changes the state of the LED. The ISR should be triggered by a timer which is set to expire after the time required to create the chosen blink rate. The main program (not the ISR) should poll the buttons SW0, SW1, and SW2. If one of them is pressed, the main program should ensure that the timer reset value is changed appropriately in the future.

    Demonstrate the assignment for me in class and submit your code to me through email at harris@ics.uci.edu. Please use the following subject line for your email, "Fundamentals, Assignment 3".

  4. Assignment 4, Due Thursday, September 12:

    Write a program which senses the rotation of a potentiometer and displays the amount of rotation on your laptop screen.

    You should write a program which will read the analog voltage dropped across the potentiometer and perform analog-to-digital conversion (ADC). The ADC produces 10-bit results but you should only retrieve the high 8-bits. Send the high 8-bits of the ADC result to your laptop via UART. The process of performing A-to-D conversion and sending it to your laptop should occur in an infinite loop, so on your laptop screen you should see a continuous stream of numbers coming from the STK600.

    You will need to install some terminal emulator program which can use the UART (serial) protocol. I use putty but you can use another terminal emulator if you want to.

    Demonstrate the assignment for me in class and submit your code to me through email at harris@ics.uci.edu. Please use the following subject line for your email, "Fundamentals, Assignment 4".