Table of Contents

Lab 5: LCD Messages

Objectives

Lab activity

In this lab, you will complete the development of a set of subroutines that you will then use to display various messages to the LCD. The messages you display will change depending on which keys on the keypad are pressed.

Download the partially-completed LCD utility subroutines from the following file: lcdlib.asm. This file contains the following subroutines1):

  1. lcd_port_config – Initializes the ATmega32 port used by the LCD display
  2. lcd_init – Initializes the LCD display
  3. lcd_cmd_write – Sends a command to the LCD display
    • Parameter: R24 – data to be written to the LCD display
  4. lcd_data_write – Sends a byte of data to the LCD display
    • Parameter: R24 – data to be written to the LCD display
  5. lcd_clear – Clear the LCD display and home cursor
  6. lcd_string_write – Display a message on the LCD screen
    • Parameter: Z – byte address of beginning of message
  7. lcd_test – Display the developer's login on the LCD screen

Of these seven subroutines, lcd_cmd_write and lcd_data_write are already implemented. You must implement the remaining five subroutines.

In addition, you should use the delay.asm library file from lab 4 that contains a subroutine delay2ms that does what it's name implies.

Write a program that makes use of the lcdlib.asm and delay.asm files to implement the functionality described below. Your program should be placed in lab5.asm. Following the usage instructions in lcdlib.asm to gain access to the subroutines in the other files.

Program Functionality

Demonstration

You are required to demonstrate your program to your instructor.

FAST Data

You should indicate how much time (in minutes) you spend on this assignment in the FAST database. You are encouraged to log your activity as you work on the project. At a minimum, you should log all of the time spent on this assignment before the due date given above. All time spent on this assignment should be entered into the week 6 column (even if you worked on it in week 5 or 7).

Lab Deliverables

You should follow your instructor's instructions for your lab submission.

Taylor

If you have any questions, consult your instructor.

1) There are two additional subroutines; however, they are not documented here because they are already implemented and it is not intended that they would be called directly