03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

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.

SERIAL COMMUNICATIONS UNIT<br />

11.2.3 Programming in Mode 0<br />

Programming is much easier in Mode 0 than in the asynchronous modes. Configuring SxCON<br />

(Figure 11-13 on page 11-15) for Mode 0 requires only two steps:<br />

1. Program M2:0 with the correct combination for Mode 0.<br />

2. If the Clear-to-Send feature is desired, set the CEN bit.<br />

The serial port is now configured for Mode 0. To transmit, write a character to SxTBUF. The TI<br />

and TXE bits reflect the status of SxTBUF and the transmit shift register. Note that the SBRK bit<br />

is independent of serial port mode functions in Mode 0.<br />

Receptions in Mode 0 are controlled by software. To begin a reception, set the REN bit in Sx-<br />

CON. The RI bit must be zero or the reception will not begin. Data begins shifting in on RXD as<br />

soon as REN is set. The asynchronous error flags (OE, FE and PE) and break flags (DBRK0 and<br />

DBRK1) are invalid in Mode 0.<br />

11.3 HARDWARE CONSIDERATIONS FOR THE SERIAL PORT<br />

There are several interface considerations when using the serial port.<br />

11.3.1 CTS Pin Timings<br />

When the Clear-to-Send feature is enabled, transmissions will not begin until the CTS pin is asserted<br />

while a transmission is pending. Figure 11-15 shows the recognition of a valid CTS.<br />

The CTS pin is sampled by the rising edge of CLKOUT. The CLKOUT high time synchronizes<br />

the CTS signal. On the falling edge of CLKOUT, the synchronized CTS signal is presented to the<br />

serial port. CTS is an asynchronous signal. The setup and hold times are given only to ensure recognition<br />

at a specific clock edge. When CTS is asynchronously, it should be asserted for at least<br />

1½ clock cycles to guarantee that the signal is recognized.<br />

CTS is not latched internally. If CTS is asserted before a transmission starts, the subsequent transmission<br />

will not begin. A write to SxTBUF “arms” the CTS sense circuitry.<br />

11.3.2 BCLK Pin Timings<br />

The BCLK pin can be configured as the input to the baud timebase clock. The baud timebase<br />

clock increments the BxCNT register. However, the BCLK signal does not run directly into the<br />

baud timebase clock. BCLK is first synchronized to the CPU clock (Figure 11-16.) The internal<br />

synchronization logic uses a low-to-high level transition on BCLK to generate the baud timebase<br />

clock that increments the BxCNT register. The CPU recognizes a low-to-high transition by sampling<br />

the BCLK pin low, then high.<br />

11-18

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

Saved successfully!

Ooh no, something went wrong!