HYUNDAI MicroElectronics | GMS90X5XC Series |
SERIAL INTERFACE (USART)
The serial port is full duplex and can operate in four modes (one synchronous mode, three asynchronous modes) as illustrated in Table 6. The possible baud rates can be calculated using the formulas given in Table 7.
Table 6. USART Operating Modes
Mode | SCON | Baudrate | Description | |||
|
| |||||
SM0 | SM1 | |||||
|
|
|
| |||
0 | 0 | 0 | fOSC | Serial data enters and exits through RxD. | ||
|
|
| 12 |
| TxD outputs the shift clock. | |
|
|
|
|
| ||
|
|
|
|
| ted/received (LSB first) | |
|
|
|
|
| ||
1 | 0 | 1 | Timer 1/2 overflow rate | |||
|
|
|
|
| 10 bits are transmitted (through TxD) or | |
|
|
| fOSC | fOSC | received (RxD) | |
2 | 1 | 0 | ||||
|
|
| 32 | 64 | 11 bits are transmitted (TxD) or received (RxD) | |
|
|
|
|
| ||
|
|
|
|
| ||
3 | 1 | 1 | Timer 1/2 overflow rate | |||
|
|
|
|
| Like mode 2 except the variable baud rate | |
|
|
|
|
|
|
Table 7. Formulas for Calculating Baud rates
Baud Rate | Interface Mode |
|
|
| Baudrate | ||
derived from |
|
|
| ||||
|
|
|
|
|
| ||
Oscillator | 0 |
|
|
| fOSC | ||
|
|
| |||||
|
|
|
|
| |||
| 2 |
| 2SMOD | × fOSC | |||
| |||||||
|
|
| |||||
Timer 1 | 1,3 | ||||||
1,3 | |||||||
Timer 2 | 1,3 |
|
|
| fOSC | ||
|
|
20 | Jan. 2001 Ver 1.0 |