
R01UH0336EJ0102 Rev.1.02
Page 1179 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 21 Clocked Serial Interface G (CSIG)
Example
Example for sending 40-bit data, for example the string 123456789A
H
:
40 bits are split into 2
16 bits plus 8 bits.
• Initialize CSIGnCFG0.CSIGnDLS[3:0] = 8
D
.
• To send the string 123456789A
H
with MSB first, write the following
sequence to CSIGnTX0W:
– 2000 1234
H
(CSIGnTX0W.CSIGnEDL = 1)
– 2000 5678
H
(CSIGnTX0W.CSIGnEDL = 1)
– 0000 009A
H
(CSIGnTX0W.CSIGnEDL = 0)
The following figure shows the timing.
Figure 21-7
EDL Timing Diagram
Note 1.
It is not possible to send two consecutive data with a data length of less than 7
bits.
Note 2.
If parity is enabled, the parity bit is added after the last bit.
Note 3.
When sending data in LSB first mode/MSB first mode, write to the
CSIGnTX0W register according to the relevant sequence below (when
transmission data is 123456
H
).
•
CSIGnCFG0.CSIGnDIR = 1: LSB first
CSIGnTX0W = 2000 3456
H
(CSIGnEDL = 1)
CSIGnTX0W = 0000 0012
H
(CSIGnEDL = 0)
•
CSIGnCFG0.CSIGnDIR = 0: MSB first
CSIGnTX0W = 2000 1234
H
(CSIGnEDL = 1)
CSIGnTX0W = 0000 0056
H
(CSIGnEDL = 0)
Note 4.
Use of the EDL function in receive-only mode during slave operation is
prohibited.
Note 5.
Setting a data length of less than 7 bits is only possible with the EDL function is
in use.
Data length is 16 bits because
CSIGnTX0W.CSIGnEDL = 1
Data lenght is 8 bits because
CSIGnCFG0.CSIGnDLS[3:0] = 8
D
(CSIGnTX0W.CSIGnEDL = 0)
9A
H
5678
H
1234
H
16 bits
16 bits
8 bits
CSIGnTSCK
CSIGnTSO
Idle time is not set because CSIGnTX0W.CSIGnEDL = 1