28.10.2014 Views

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Freescale</strong> <strong>Semiconductor</strong>, Inc.<br />

Serial Communications Interface Modules (SCI1 and SCI2)<br />

Transmitter<br />

16.11.2 Transmitting a Frame<br />

To begin an SCI transmission:<br />

nc...<br />

<strong>Freescale</strong> <strong>Semiconductor</strong>, I<br />

1. Configure the SCI:<br />

a. Write a baud rate value to SCIBDH and SCIBDL.<br />

b. Write to SCICR1 to:<br />

i. Enable or disable loop mode and select the receiver<br />

feedback path<br />

ii.<br />

iii.<br />

iv.<br />

Select open-drain or wired-OR SCI outputs<br />

Select 10-bit or 11-bit frames<br />

Select the receiver wakeup condition: address mark or<br />

idle line<br />

v. Select idle line type<br />

vi.<br />

Enable or disable the parity function and select odd or<br />

even parity<br />

c. Write to SCICR2 to:<br />

i. Enable or disable TDRE, TC, RDRF, and IDLE interrupt<br />

requests<br />

ii.<br />

iii.<br />

iv.<br />

2. Transmit a byte:<br />

Enable the transmitter and queue a break frame<br />

Enable or disable the receiver<br />

Put the receiver in standby if required<br />

a. Clear the TDRE flag by reading SCISR1 and, if sending 9-bit<br />

data, write the ninth data bit to SCDRH.<br />

b. Write the byte to be transmitted (or low-order 8 bits if sending<br />

9-bit data) to SCIDRL.<br />

3. Repeat step 2 for each subsequent transmission.<br />

Writing the TE bit from 0 to 1 loads the transmit shift register with a<br />

preamble of 10 (if M = 0) or 11 (if M = 1) logic 1s. When the preamble<br />

shifts out, the SCI transfers the data from SCIDRH and SCIDRL to the<br />

transmit shift register. The transmit shift register prefaces the data with<br />

a 0 start bit and appends the data with a 1 stop bit and begins shifting<br />

out the frame.<br />

<strong>MMC2107</strong> – Rev. 2.0<br />

Technical Data<br />

MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 353<br />

For More Information On This Product,<br />

Go to: www.freescale.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!