Download Print this page

Renesas Asynchronous SH7145F Application Note page 12

Asynchronous serial data transmission/reception

Advertisement

(2) SCI1 Initialize Routine
REJ06B0357-0100O/Rev.1.00
Asynchronous Serial Data Transmission/Reception
init_sci()
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
Wait minimum
1-bit transfer time
Yes
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
RTE
March 2004
No
SH7145F
Page 12 of 17

Advertisement

loading