You have two weeks to work on this lab. You need to submit a flow chart at the beginning of your lab class during the week of October 20th. This lab is due at the end of your assigned lab period the week of October 27th.
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 Books 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. For this lab the pre-lab design work is a flow chart of your program and a block diagram of the connections to the 6811. At the beginning of the lab, submit your pre-lab design work. 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:
Use these requirements from Lab 3 and add an indexed array of stored values.
Load a value from Port E into register A;
Use the simulator switches to set values on Port E; Mask
the high order 4 bits and use
the lowest order 4 bits as one BCD digit, test whether the BCD value
is legal, and stop if the BCD value is illegal.
new requirements include:
input an ascii character from the display into the serial
input pin on Port D.
Check whether the character is 0 through 9, and if not
it is illegal and you should stop.
convert the ascii character to a binary number. The hex value of ascii 0 is $30
and the hex value of ascii 1 is $31, ...
through the hex value of ascii 9 which is $39.
To convert from ascii to binary just subtract $30 from the value.
Output the BCD result to the lowest order 4 bits of Port B and the
converted number to the high order bits. Store up to 100 of these side-by-side
values to memory.
Connect port B to the LCD for display.
Output on three bits of Port C to leds. bit 0 to a red LED, bit1 to
a yellow LED, and bit 2 to a green LED. Before conversion, turn on all three LEDS.
After checking, if either value is illegal turn off all three LEDS
and output as many BCD values as have been read before stopping.
After converting the legal values, light the Green LED is the BCD number is
greater, Light the Yellow LED if the values are equal, and the red LED is
the converted ascii is greater than the BCD.
After 100 side-by-side values have been saved, then output all 100 values
to the LCD one at a time waiting for the value on bit 0 of Port E to change before
sending a value to the LCD. Specifically, when bit 0 of Port E is a 0, then an even
position can be output, when bit 0 of Port E is a 1 then an odd position can be output.
Questions to be demonstrated:
Does your program always stop 100 values have been read?
Does your program output fewer than a 100 values when an illegal value
has been read?
Feel free to email comments and suggestions to acken@okstate.edu