EE 308 -- LAB 9
Parallel Communications using the MC6821 PIA

In this lab, one HC11 board (the master) will be used to query another HC11 board (the slave) about its status. The master HC11 will send a byte to the slave HC11. The slave HC11 will return to the master the value in its corresponding register -- e.g., if the master sends the slave the number 0x2B, the slave will return the value of its BAUD register 0x102B. In this manner, the master can find out the value of any register inside the slave.

  1. Connect two HC11 EVBU boards together as shown below. The switch going to the TIC1 line on the Master HC11 should be one of the debounced switches on your protoboard.

      
    Figure 1: Connection of two HC11 EVBU boards for parallel communication.

  2. Program the master HC11 board as follows:

  3. Program the slave HC11 board as follows:

  4. Verify that the system works properly. For example, have the master determine the value of the slave's BAUD register, and verify that it is 9600.

  5. Connect your logic analyzer to the master's PIA Port B, CB1, CB2, TIC1, IRQ and E Clock lines, and to the slave's IRQ and E Clock lines. Trigger your logic analyzer of the falling edge of the master's TIC1 line. Measure the following times, and compare (where appropriate) to the values specified on the MC6821 data sheet:

    1. The time from the falling edge on TIC1 to new data on the master's PIA Port B. This is how long it takes the master to get into the TIC1 interrupt service routine, read Port E, and send the data to PIA Port B.

    2. The time from the master's E clock going low to new data on the master's PIA Port B. This is time tPDW on the MC6821 data sheet.

    3. The time from new data on the master's PIA Port B to CB2 going low. This is time tDC on the MC6821 data sheet.

    4. The time from the master's E Clock going high to CB2 going low. This is time tDC on the MC6821 data sheet.

    5. The time from the master's E Clock going high to CB2 going high. This is time tRS1 on the MC6821 data sheet.

    6. The time CB2 is low. This is time PWCT on the MC6821 data sheet.

    7. The time from the slave's CA1 going low to the slave's IRQ going low. This is time tRS3 on the MC6821 data sheet.

    8. The time from the slave's E clock going high to the slave's IRQ going high. This is time tIR on the MC6821 data sheet.



Bill Rison, <rison@ee.nmt.edu >
Fri Mar 22 1996
© 1996, New Mexico Tech