04.01.2014 Views

Clock Synchronous Serial I/O Mode - von Gunthard Kraus

Clock Synchronous Serial I/O Mode - von Gunthard Kraus

Clock Synchronous Serial I/O Mode - von Gunthard Kraus

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.

R8C/10, R8C/11, R8C/12, R8C/13 Group<br />

<strong>Serial</strong> I/O Operation (<strong>Clock</strong> <strong>Synchronous</strong> <strong>Serial</strong> I/O <strong>Mode</strong>)<br />

4. Flow Chart<br />

4.1 Initial Operation and Main Loop<br />

main<br />

asm("FCLR I")<br />

prc0 = 1<br />

cm13 = 1<br />

cm15 = 1<br />

cm05 = 0<br />

cm16 = 0<br />

cm17 = 0<br />

cm06 = 0<br />

; Interrupt disabled<br />

; System clock control register protect cancellation<br />

; XIN-XOUT pin<br />

; XIN-XOUT drive capability : HIGH<br />

; Main clock : oscillation<br />

; No division mode<br />

; Main clock division CM16, CM17 enabled<br />

asm("nop")<br />

asm("nop")<br />

asm("nop")<br />

; Wait for stability (Main clock)<br />

asm("nop")<br />

ocd2 = 0<br />

prc0 = 0<br />

SFR INITIAL SETTING<br />

sfr_init<br />

; Select main clock<br />

; System clock control register protect<br />

; SFR initial setting (port initial setting, timer setting)<br />

Main period process<br />

No<br />

; Timer X wait for request (250µs)<br />

Yes<br />

ir_txic = 0<br />

; Timer X request flag clear<br />

SERIAL TRANSMIT/RECEIVE<br />

Cs_sral<br />

; <strong>Serial</strong> transmit/receive process (clock synchronized)<br />

REJ05B0452-0110Z/Rev.1.10 August 2004 Page 3 of 11

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

Saved successfully!

Ooh no, something went wrong!