CE-2800 Embedded Systems Software
Lab 7: Dual-channel Voltmeter

Objectives

Assignment

In this lab you will write a program that, using the D/A converter subsystem of the Atmega32, measures and displays the voltages applied to PortA pins PA0 and PA1 from an external power supply (on the lab bench). Your program will be interrupt-driven; that is, these conversions will only take place when external interrupts (caused by pushbuttons INT0 and INT1) occur.

Hardware Configuration

Program Functionality


LCD display driver extensions

You'll also be implementing new functionality into your LCD display library display_dd.asm: You must add a new subroutine, named displayValue16, that (at the current cursor location) outputs the hexadecimal representation the value contained in the 16-bit X register (thus the X register is the "argument" to this new subroutine). As an example, if the X register contains the value 1, then 0x0001 should appear on the display. Similarly, if the X register contains the value 1000, then 0x03E8 should appear.

Demonstration

You must demonstrate your working program on your board before the lab next week.

Lab Submission (due 11:00pm, Tuesday, January 31, 2012)

For your submission, you need only supply your working, fully commented Lab7.asm and display_dd.asm.

Upload your submission through Blackboard (assignment "Lab 7").

Be sure to keep copies of all your files, in case something gets lost.

Grading

Your lab grade will be determined by the following factors:

Program - comments and formatting are important aspects of assembly language programming! And it has to work correctly.

Timeliness of submission as stated in the course policies.