EE 308 -- LAB 11
Synchronous Serial Communications on the 68HC11

In this lab, one HC11 board (the master) will be used to send instructions to another HC11 board (the slave). The master HC11 will send a byte to the slave HC11. The slave HC11 will display a pattern of LEDs depending on the value it receives. The master will read the time from the Real Time Clock, and write it to its terminal. The system should use the SPI to communicate between the two boards and the RTC.

The lower two bits of the input word will tell which pattern to implement, and the next two bits will tell the rate at which the display should update:

Switch Display
Switch Update
1:0 Mode
3:2 Rate
0:0 Increment 0:0 4 ms
0:1 Decrement 0:1 8 ms
1:0 Flash 1:0 16 ms
1:1 T-Bird 1:1 33 ms

  1. Connect two HC11 EVBU boards together as shown below. The switch going to the CA1 line on the Master HC11 should be one of the debounced switches on your protoboard. (Note: Only the master RTC should be active. You need to make sure the slave RTC remains idle by writing a 0 to Bit 5 of Port D on the slave board.)

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

  2. Program the master HC11 board as follows:

  3. Program the slave HC11 board as follows:

  4. Connect your logic analyzer to the master's CA1, MOSI, MISO, SCLK, IRQ, tt PIA Port A Bits 3--0, tt PIA Port A Bit 4, and E Clock lines.

  5. Trigger your logic analyzer of the falling edge of the master's CA1 line. Measure the following times, and compare (where appropriate) to the values specified on the MC6821 data sheet and the 68HC11 Technical Data Manual:

    1. The time from the falling edge on CA1 to data being sent over the SPI. This is how long it takes the master to get into the CA1 interrupt service routine, read Port A, and send the data.

    2. The SPI clock frequency.

    3. Determine on which SCLK edge the data is valid, and whether the data is sent with the most significant bit or least significant bit first.

Bill Rison, < >
Tue March 31 1998

© 1998, New Mexico Tech