beautypg.com

Renesas Asynchronous SH7145F User Manual

Page 12

background image

SH7145F

Asynchronous Serial Data Transmission/Reception

REJ06B0357-0100O/Rev.1.00

March 2004

Page 12 of 17

(2) SCI1 Initialize Routine

No

Yes

Cancel SCI1 module standby status

Clear to 0 bits TIE, RIE, TE, RE, MPIE,
and TEIE in SCR_0

Select on-chip clock as clock source
using CKE1 and CKE0 in SCR_0

Using SMR_1, select asynchronous
mode, 8 data bits, no parity, 1 stop bit,
and P

φ

as baud rate generator clock

source

Using BRR_1, set communication
speed to 19,200 bps

Using DIR bit in SDCR_1, select
LSB-first communication

Using SCR_1, enable ERI interrupt

Using PACRL2, set PA3 (pin 133) to
RXD function and PA4 (pin 134)
to RXD function

Set bits TE and RE in SCR_1 to 1 to
enable transmit operation and receive
operation

Wait minimum

1-bit transfer time

init_sci()

RTE