21.07.2015 Views

M16C User Manual.pdf

M16C User Manual.pdf

M16C User Manual.pdf

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.

UARTMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER2.5.2 Operation of Serial I/O (transmission in UART mode)In transmitting data in UART mode, choose functions from those listed in Table 2.5.4. Operations of thecircled items are described below. Figure 2.5.8 shows the operation timing, and Figures 2.5.9 and 2.5.10show the set-up procedures.Table 2.5.4. Choosed functionsItemSet-upItemSet-upTransfer clocksource(Note 2)CTS functionTransmissioninterrupt factorCTS / RTSseparation function(Note 1)OOOOInternal clock (f1 / f8 / f32)External clock (CLKi pin)CTS function enabledCTS function disabledTransmission buffer emptyTransmission completePin shared by CTS and RTSCTS and RTS separateSleep mode(Note 2)Data logic selectfunction(Note 3)TXD, RXD I/Opolarity reverse bit(Note 3)Bus collisiondetection function(Note 3)OOOOSleep mode offSleep mode selectedNo reverseReverseNo reverseReverseNot selectedSelected_______________Note 1: UART0 only. (UART1 CTS/RTS function cannot be used when this function is selected.)Note 2: UART0, UART1 only.Note 3: UART2 only.Operation(1) Setting the transmit enable bit to “1” and writing transmission data to the UARTi transmitbuffer register readies the data transmissible status.________________(2) When input to the CTSi pin goes to “L”, transmission starts (the CTSi pin needs to be controlledon the reception side).(3) Transmission data held in the UARTi transmit buffer register is transmitted to the UARTitransmit register. At this time, the first bit (the start bit) of the transmission data is transmittedfrom the TxDi pin. Then, data is transmitted, bit by bit, in sequence: LSB, ····, MSB, parity bit,and stop bit(s).(4) When the stop bit(s) is (are) transmitted, the transmit register empty flag goes to “1”, whichindicates that transmission is completed. At this time, the UARTi transmit interrupt request bitgoes to “1”. The transfer clock stops at “H” level.(5) If the transmission condition of the next data is ready when transmission is completed, a startbit is generated following to stop bit(s), and the next data is transmitted.358

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

Saved successfully!

Ooh no, something went wrong!