Final laboratory project for ECE2510 Intro to Microprocessors at Western Michigan University
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
CodeWarrior Project.zipThis is the final copy (I think) of the CodeWarrior project. The source assembly is in a sub-folder.x-zip-compressed - 195.57 kB - 04/09/2016 at 21:11 |
|
|
Lab_FinalProject.pdfProject description and requirements. Source: Mauro Pereira and Ayaz Akram of Western Michigan UniversityAdobe Portable Document Format - 317.13 kB - 04/02/2016 at 04:44 |
|
|
Lab09_LCD&Keyboard.pdfLab manual for LCD and Keypad interfacing. Source: Mauro Pereira and Ayaz Akram of Western Michigan UniversityAdobe Portable Document Format - 682.92 kB - 04/02/2016 at 04:41 |
|
|
Lab09_KEYPAD.txtASM file to interface with Keypad on Dragon12 board. Source: www.microdigitaled.complain - 9.21 kB - 04/02/2016 at 04:41 |
|
|
Lab09_LCD.txtASM file to interface with LCD display on Dragon12 board. Source: www.microdigitaled.complain - 3.84 kB - 04/02/2016 at 04:41 |
|
I came to school this morning (Saturday, 4/9/16) hoping that someone might be able to let me into the Microprocessors lab at some point today. After working on some other homework near the entrance for about an hour, I spotted my TA walking in. Praise God!
So I worked on the project for about 5 hours and I think I've got it to a good place to call finished. There are some points I'm not going to get, but the complexity of those requirements is something I'm not about to spend another 10 hours on.
What I completed today:
Added a video to the details section! Enjoy!
Yesterday, Thursday 4/7/16, I was in the lab from 12:00-2:30. It was not exceedingly successful in terms of getting closer to the finished project. I spent a lot of time trying to make the LCD display the correct floor number, regardless of which floor form which the user is starting the motion. Unfortunately, I ran out of time as I was getting close - I think ;). I actually think that I have the flow of the program complete. All of the major loops and subroutines (and returns) appear to be functioning as I intend them to.
I still don't know if this thing is supposed to be done by Tuesday, 4/12/16, but I can't imagine anyone in class is going to be finished if the lab isn't opened between now and then.
Todos:
I was in the lab today from 11:30-4:00. Made quite a bit of progress on the logical flow and organization of the project.
One of the big milestones was learning how to use additional files as libraries. I broke the code up into 4 or 5 separate files based on functionality. This was as simple as creating a text document with the .inc suffix, right-clicking on the "Sources" directory in the project tree, and adding the text document. The code was modified as such:
;*************** ;Header.... ; ;*************** ... INCLUDE 'newText.inc' ... Code
I also worked out a lot of the logical flow. There is essentially a forever loop in the main function. In its ready state, it is waiting for keypad input. A series of compare instructions test which subroutine to jump to based on which key is pressed. The current draft of this loop is shown below:
MAIN ;Waiting for Input JSR READKEYS STAA LAST_KY CMPA #OPEN BEQ B1 CMPA #CLOSE BEQ B2 CMPA #EXT_1 BGE B3 CMPA #INT_1 BEQ B4 CMPA #INT_2 BEQ B4 CMPA #INT_3 BEQ B4 CMPA #INT_4 BEQ B4 B1 JSR OPEN_DOOR BRA MAIN B2 JSR CLOSE_DOOR BRA MAIN B3 JSR COME BRA MAIN B4 JSR GOTO BRA MAIN
This thing is supposed to be done by next Tuesday, but with only one more lab day available to us before then, I'm not sure how far we are going to get. I plan on working in the lab on Thursday, 4/7/16, 12:00-2:00.
To write a string to the LCD on the HCS12, I wrote the following bit of assembly:
;main bit of program running up here ; .... ........ ; .... ........ LDX #NEX_FLR ;load X with string pointer LDY #NEX_LEN ;load Y with string length JSR WRT_STRING ;jump to WRT_STRING sub WRT_STRING DISP LDAA X ;put the value at X in A JSR DATWRT4 ;sub to write the character JSR DELAY ;required delay for LCD INX ;next letter in the string DBNE Y, DISP ;decrement string count and repeat RTS ;once string is all printed, return NEX_LEN EQU 11 ;string length NEX_FLR FCB 'Next Floor ' ;string contents
I have uploaded a number of files associated with this project. We have been given source assembly code to get us going with interfacing the HCS12 with the LCD and keypad on the Dragon12 board.
I spent some time in the lab on Thursday, 3/31/16 during Ayaz's office hours. I was able to get the LCD to display keypad digits and characters. I am working on better merging the LCD and keypad source code. I hope to work some sort of library structure into the mix to improve the organization of the project.
My next opportunity for lab time will be Tuesday, 4/5/16, 11:30-4:00.
To-do:
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates