447
CHAPTER 22 SERIAL I/O
22.4.1
Shift Clock
There are two modes of shift clock: internal or external shift clock. These two modes
are selected by setting the SMCS. To switch the modes, ensure that serial I/O transfer is
stopped. To check whether the serial I/O transfer is stopped, read the BUSY bit.
■
Internal Shift Clock Mode
In internal shift clock mode, data transfer is based on the internal clock. As a synchronization timing
output, a shift clock of 50% duty ratio can be output from the SCK4 pin. Data is transferred at one bit per
clock. The transfer frequency and speed is expressed as follows:
"A" is the division ratio indicated by the SMD bits of SMCS. The value can be 2
1
, 2
2
, 2
3
, 2
4
, 2
5
, 2
6
or 2
7
.
φ
is the machine frequency.
■
External Shift Clock Mode
In external shift clock mode, the data transfer is based on the external clock supplied via the SCK4 pin.
Data is transferred at one bit per clock.
The transfer speed can be between DC and 1/(5 machine cycles). For example, the transfer speed can be up
to 2 MHz when 1 machine cycle is equal to 0.1
μ
s. The external clock frequency has a maximum value of
2 MHz.
A data bit can also be transferred by software, which is enabled as described below.
Select external shift clock mode, and write "0" to the SCOE bit of SMCS. Then, write "1" to the direction
register for the port sharing the SCK4 pin, and place the port in output mode. Then, when "1" and "0" are
written to the data register (PDR) of the port, the port value output via the SCK4 pin is fetched as the
external clock and transfer starts. Ensure that the shift clock starts from "H".
Note:
The SMCS or SDR must not be written to during serial I/O operation.
Tr
a
n
s
fer fre
qu
ency [Hz] =
A div
Tr
a
n
s
fer
s
peed [
s
] =
A div
Summary of Contents for MB90390 Series
Page 2: ......
Page 4: ......
Page 17: ...xiii APPENDIX D List of Interrupt Vectors 690 INDEX 695 ...
Page 18: ...xiv ...
Page 132: ...104 CHAPTER 5 CLOCKS ...
Page 152: ...124 CHAPTER 6 CLOCK MODULATOR ...
Page 210: ...182 CHAPTER 11 TIME BASE TIMER ...
Page 218: ...190 CHAPTER 12 WATCHDOG TIMER ...
Page 264: ...236 CHAPTER 14 16 BIT RELOAD TIMER WITH EVENT COUNT FUNCTION ...
Page 274: ...246 CHAPTER 15 WATCH TIMER ...
Page 306: ...278 CHAPTER 17 DTP EXTERNAL INTERRUPTS ...
Page 338: ...310 CHAPTER 18 8 10 BIT A D CONVERTER ...
Page 364: ...336 CHAPTER 19 UART0 UART1 ...
Page 398: ...370 CHAPTER 20 UART2 UART3 Figure 20 5 2 ORE Set Timing Receive data RDRF ORE ...
Page 432: ...404 CHAPTER 20 UART2 UART3 ...
Page 482: ...454 CHAPTER 22 SERIAL I O ...
Page 560: ...532 CHAPTER 24 STEPPING MOTOR CONTROLLER ...
Page 582: ...554 CHAPTER 27 ROM MIRRORING MODULE ...
Page 632: ...604 CHAPTER 29 EXAMPLES OF SERIAL PROGRAMMING CONNECTION ...
Page 722: ...694 APPENDIX ...
Page 723: ...695 INDEX The index follows on the next page This is listed in alphabetic order ...
Page 740: ......