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
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.2 SFR Initial Setting<br />
sfr_init<br />
p1 = p1 | 0x50<br />
pd1 = pd1 | 0x50<br />
pd1 = pd1 & 0xdf<br />
txck0 = 1<br />
txck1 = 0<br />
prex = 50-1<br />
tx = 10-1<br />
txmr = 0x00<br />
txs = 1<br />
u0mr = 0x01<br />
u0c0 = 0x01<br />
u0rrm = 0<br />
u0brg = 8-1<br />
re_u0c1 = 1<br />
; Port P14,P16 initial setting<br />
; Port P14,P16 direction bit initial setting<br />
; Port P15 direction bit initial setting<br />
; Timer X count source : f8<br />
; Prescaler X = 50<br />
; Timer X = 10<br />
; Timer X : timer mode<br />
; Timer X count start<br />
; <strong>Clock</strong> synchronous serial I/O mode<br />
Internal clock<br />
; BRG count source :f8sio<br />
TXD0: CMOS output<br />
Transmit data is output at falling edge of transfer clock<br />
and receive data is input at rising edge<br />
LSB first<br />
; Continuous receive mode disabled<br />
; Count source: Divided-by 8<br />
; Reception enabled<br />
return<br />
REJ05B0452-0110Z/Rev.1.10 August 2004 Page 4 of 11