Serial Communication Controllers (SCCs)
7-234
MC68360 USER’S MANUAL
MOTOROLA
PADIR bit 14 with a zero.
5. Connect the CLK7 pin to SCC4 using the SI. Write the R4CS bits in SICR to 110.
Write the T4CS bits in SICR to 110.
6. Connect the SCC4 to the NMSI (i.e., its own set of pins). Clear the SC4 bit
in the SICR.
7. Write $0740 to the SDCR to initialize the SDMA Configuration Register.
8. Write RBASE and TBASE in the SCC parameter RAM to point to the Rx BD and Tx
BD in the dual-port RAM. Assuming one Rx BD at the beginning of dual-port RAM,
and one Tx BD following that Rx BD, write RBASE with $0000 and TBASE with
$0008.
9. Program the CR to execute the INIT RX & TX PARAMS command for this channel.
For instance, to execute this command for SCC1, write $0001 to the CR. This com-
mand causes the RBPTR and TBPTR parameters of the serial channel to be updated
with the new values just programmed into RBASE and TBASE.
10.Write RFCR with $18 and TFCR with $18 for normal operation.
11.Write MRBLR with the maximum number of bytes per receive buffer. For this case,
assume 16 bytes, so MRBLR = $0010.
12.Write CRC_P with $0000FFFF to comply with the 16-bit CRC-CCITT.
13.Write CRC_C with $0000F0B8 to comply with the 16-bit CRC-CCITT.
14.Initialize the Rx BD. Assume the Rx data buffer is at $00001000 in main memory.
Write $B000 to Rx_BD_Status. Write $0000 to Rx_BD_Length (not required—done
for instructional purposes only). Write $00001000 to Rx_BD_Pointer.
15.Initialize the Tx BD. Assume the Tx data buffer is at $00002000 in main memory
and contains five 8-bit characters. Write $BC00 to Tx_BD_Status. Write $0005 to
Tx_BD_Length. Write $00002000 to Tx_BD_Pointer.
16.Write $FFFF to the SCCE to clear any previous events.
17.Write $0013 to the SCCM to enable the TXE, TX, and RX interrupts.
18.Write $08000000 to the CIMR to allow SCC4 to generate a system interrupt. (The
CICR should also be initialized.)
19.Write $00001980 to GSMR_H4 to configure the transparent channel.
20.Write $00000000 to GSMR_L4 to configure the CTS and CD pins to automatically
control transmission and reception (DIAG bits). Normal operation of the transmit
clock is used (TCI is cleared). Notice that the transmitter (ENT) and receiver (ENR)
have not been enabled yet.
21.Write $00000030 to GSMR_L4 to enable the SCC4 transmitter and receiver. This
additional write ensures that the ENT and ENR bits will be enabled last.
NOTE
After 5 bytes have been transmitted, the Tx BD is closed. Addi-
tionally, the receive buffer is closed after 16 bytes have been re-
ceived. Any additional receive data beyond 16 bytes will cause