ECEN 3213 Fall 2002 Lab Assignment #5

98765

You have two weeks to work on this lab. This lab is due at the end of your assigned lab period the week of November 11th.


For this Lab use the M68HC11A8, which is the version diagramed in Figure 1.28 on page 24 of the Valvano book. The complete technical information is located on the Book’s CD in the file: D:\PDF\6811\HC11A8.pdf For all labs you are to bring your pre-lab design work, which may include diagrams, flow charts, Pseudo code, test case descriptions, and some text descriptions of the project. At the beginning of the lab, submit your pre-lab design work. For this lab pre-lab documentation, in addition to the usual flow chart and memory map, be sure to include a state diagram for the I/O handshake protocol. (Hint: My state diagram for this lab has 5 states.) At the end of the lab turn in the disk with be all of your simulation files. This disk will be returned to you each lab to submit the results of that lab. Be sure the disk is labeled with your name, ECEN3213, and the meeting day and time for your lab. The files for the project should include at least the assembly program and the simulation results for your test cases. You must demonstrate correct (error free) assembly and at least one test case execution to the lab instructor before you submit your disk. There should be two subroutines:
1) to convert BCD to binary and store the values
and
2) to dump binary values to the output port.

Program requirements:
Load a BCD value from Port E.
Test for legal 2 digit BCD value.
Count the number of illegal values input, and stop when the error count hits 255.
output all 1's on Port B when error value is detected.
convert legal BCD input to binary value.
Store up to 100 binary values in memory.
Output the converted result to Port B when indicated by the handshake protocol.
-Count the number of values translated.
-output all (up to 100) stored values on the Port B, When count of stored values hits 100 or when the handshake protocol says to Dump values.
-Use PORT A for the following handshake protocol:
Port A(input)Port A(output)
a2a1a0a6a5a4a3Status/note
001....Port E ready to be read, and input values are 2 BCD digits
010....Dump all Stored Values on Port B
000....No new data, and no action yet
100....Show converted output on Port B
... 0..1Ready to read Port E
... ..1.Error on Data Conversion
... .1.0Output of values in progress
... 1..0Number of stored values is 100.


For this lab, use the following simulator setup:
Use the keypad for input on Port A.
Use 8 switches for input on Port E.
Hook the LCD to Port B for output of converted values.
Hook the LEDs to Port A pins for the I/O handshake protocol.


Feel free to email comments and suggestions to DrAcken@acken.com