In this lab, you will design, code, assemble, simulate, download and run
a program. Your program should begin by displaying your MSOE login on
the LCD. Your login should be stored in program memory. In addition,
your program should read from locations 0x70, 0x71 and 0x72 in data memory
and display the hexadecimal value stored in these locations on the LCD display.
You will demonstrate the program by:
Use ATmon to write arbitrary values to the data memory locations
0x70-0x72. This is done using the modify memory command, e.g.,
m 70 af
Use a push button to indicate the value(s) stored in data memory have
changed. When the button press is detected, your program should
display the contents of 0x70-0x72 on the LCD.
Program Notes:
In order to complete this assignment you should write the following
subroutines:
delay2ms -- provides a 2ms delay when called
lcdPortInit -- configures all ports needed to use the LCD
lcdInit -- sends a sequence of initialization commands to LCD
lcdCmdWrite -- writes the command stored in R20 to the LCD (you may use the code from the wiki)
lcdDataWrite -- writes the data stored in R20 to the LCD
lcdClear -- clears the LCD and sends the cursor home
lcdStringWrite -- writes a null-terminated string stored in program memory (indicated by the Z pointer) to the LCD
convertLowerNibble -- converts lower nibble of r20 into its ASCII equivalent (you may use the code from the wiki)
memoryToLCD -- writes the contents of three consecutive memory locations to the LCD. The X register contains the address of the first of the three memory locations.
Pre-laboratory activity (due on entering the week 6 lab)
At a minimum, the following subroutines are due at the beginning of lab:
delay2ms,
lcdPortInit,
lcdInit,
lcdCmdWrite and
lcdDataWrite.
Prior to entering the room, you should submit your documented
.asm file containing the required
subroutines using the
online submission form.
Laboratory Demonstration (due 5pm the day prior to the week 7 lab)
You must demonstrate your program working on your board.
Laboratory Report (due 11pm the day prior to the week 7 lab)