ECEN 3213 Spring 2001 Lab Assignment #4

98765


Lab 4 I/O for translator
This lab is due at end of your assigned lab section during week of March 12. 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, pick up your 3.5 inch disk from the previous. 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. Label the disk 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.

Program requirements:
Lab 4 is similar to Lab 3; it just sets up and uses PORT C for both input and some output.
-Input 8 bits on PORT C that are either 2 BCD digits or one of three Seven Segment code digits (This will take reading three bytes in a row, with handshaking). The handshake protocol listed below determines whether to consider the input as BCD or Seven Segment.
-Translate input from PORT C to a binary value (notice this takes 2 bytes for a large enough binary number to hold 999).
-Save up to 100 translated binary valuesvalues (These must be 16 bit values, because 3 seven segment digits could be the number 999).
-Check for illegal input values.
-Count the number of values translated(notice three seven segments count as one binary store).
-Count the number of read bytes containing illegal inputs.
-Stop execution when then count of illegal reads his 255
-Wait for Dump and then a Reset-to-0 handshake when the number of translated values hits 100.
-After any Reset-to-0 the program should go back to reading input bytes.
-output all (up to 100) stored values on the serial port, when the handshake protocol says to Dump values. Notice, the intent of this lab is to study I/O setup on bi-directional PORT C, therefore you do not need to put any simulator device to monitor the output on the serial port.
-Use PORT A and PORT B for the following handshake protocol:
Port APort B
a2a1a0b7b6b5b4b3b2b1b0.
001........Port C ready to be read, and input values are 2 BCD digits
011........Port C ready for next byte to be read, and Input values are Seven Segment
101........Dump all Stored Values on serial port
xx0........No new data, and no action yet, set PORT C for input
111........Reset-to-0 all counts and output stored binary value count on PORT C.
. .......01Ready to read Port C
.........10Finished reading port C
....00..1..Error on Data Conversion
......01..0Serial Output of values in progress
......10...Serial Output of values finished
....01..0..BCD successfully converted and stored
....10..0..Seven Segment successfully converted and stored
...1......0Number of stored values is 100.


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

Red Stars red