You have two weeks to work on this lab. This lab is due at the end of your assigned lab period the week of October 15th.
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 C 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 C.
-Count the number of values translated.
-output all (up to 100) stored values on the Port C,
When count of stored values hits 100
or
when the handshake protocol says to Dump values.
-Use PORT A and PORT B for the following handshake protocol:
| Port A | Port B | ||||||||||
| a2 | a1 | a0 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | . |
| 0 | 0 | 1 | . | . | . | . | . | . | . | . | Port E ready to be read, and input values are 2 BCD digits |
| 1 | 0 | 1 | . | . | . | . | . | . | . | . | Dump all Stored Values on Port C |
| 0 | 0 | 0 | . | . | . | . | . | . | . | . | No new data, and no action yet |
| 1 | 1 | 0 | . | . | . | . | . | . | . | . | Byte received from dump, ready for another byte |
| 1 | 1 | 1 | . | . | . | . | . | . | . | . | Reset-to-0 all counts |
| . | . | . | . | . | . | . | . | 0 | 1 | Ready to read Port E | |
| . | . | . | . | . | . | . | . | . | 1 | 0 | Finished reading port E |
| . | . | . | . | 0 | 0 | . | . | 1 | . | . | Error on Data Conversion |
| . | . | . | . | . | . | 0 | 1 | . | . | 0 | Output of values in progress |
| . | . | . | . | . | . | 1 | 0 | . | . | . | Output of values finished |
| . | . | . | . | 0 | 1 | . | . | 0 | . | . | BCD successfully converted and stored |
| . | . | . | 1 | . | . | . | . | . | . | 0 | Number of stored values is 100. |
For this lab, use the following simulator setup:
Use three switches for input on Port A.
Use 5 switches for input on Port E. Connect switches to pins 7, 6, 4, 3, and 0.
Leave pins 5, 2, and 1 unconnected, and hence they will stay at logic 0.
Hook the LCD to Port C for output of converted values.
Hook the LEDs to Port B pins for the I/O handshake protocol.
Feel free to email comments and suggestions to John_M_Acken@acken.com