III PERIPHERAL BLOCK: SERIAL INTERFACE
Any desired clock frequency can be obtained by setting the prescaler division ratio and the reload data of the
The
Furthermore, the clock output by the
These division ratios are taken into account in Eq. 2.
| fPSCIN ⋅ pdr ⋅ sdr | (Eq. 2) |
RLD = | ||
| 2 ⋅ bps |
|
RLD: | Set value of the | |
fPSCIN: Prescaler input clock frequency (Hz) | ||
bps: | Transfer rate (bits/second) |
|
pdr: | Division ratio of the prescaler |
|
sdr: | Internal division ratio of the serial interface (1/16 or 1/8) |
Note: The division ratio selected using the prescaler differs between
Table 8.4 shows examples of prescaler division ratios and the reload data settings of the programmable timer, in cases in which the internal division ratio of the serial interface is set to 1/16.
Table 8.4 Example of Transfer Rate Settings
Transfer rate |
| fPSCIN = 20 MHz |
| fPSCIN = 25 MHz |
| fPSCIN = 33 MHz | ||||||
(bps) | RLD |
| pdr | Error (%) | RLD |
| pdr | Error (%) | RLD |
| pdr | Error (%) |
300 | 129 |
| 1/16 | 0.16025 | 162 |
| 1/16 | 216 |
| 1/16 | 0.00640 | |
1200 | 129 |
| 1/4 | 0.16025 | 162 |
| 1/4 | 216 |
| 1/4 | 0.00640 | |
2400 | 129 |
| 1/2 | 0.16025 | 162 |
| 1/2 | 216 |
| 1/2 | 0.00640 | |
4800 | 64 |
| 1/2 | 0.16025 | 80 |
| 1/2 | 108 |
| 1/2 | ||
9600 | 32 |
| 1/2 | 40 |
| 1/2 | 53 |
| 1/2 | 0.46939 | ||
14400 | 21 |
| 1/2 | 13 |
| 1/4 | 35 |
| 1/2 | 0.46939 | ||
28800 | 10 |
| 1/2 | 13 |
| 1/2 | 17 |
| 1/2 | 0.46939 |
Make sure the error is within 1%. Calculate the error using the following equation:
fPSCIN ⋅ pdr
Error =
For details on how to control the prescaler and
•External clock
When an external clock is selected, the serial interface is clocked by a clock input from the #SCLKx pin. Therefore, there is no need to control the prescaler and
Any desired clock frequency can be set. The clock input from the #SCLKx pin is internally divided by 16 or 8 in the serial interface, in order to create a sampling clock (refer to "Sampling clock"). This division ratio must also be considered when setting the transfer rate.
EPSON | S1C33L03 FUNCTION PART |