TMP91C824
91C824-143
(2) Mode 1 (7-bit UART Mode)
7-Bit UART Mode is selected by setting Serial Channel Mode Register SC0MOD0<SM1, SM0>
to 01.
In this mode, a parity bit can be added. Use of a parity bit is enabled or disabled by the setting of the
Serial Channel Control Register SC0CR<PE> bit; whether even parity or odd parity will be used is
determined by the SC0CR<EVEN> setting when SC0CR<PE> is set to 1 (enabled).
Setting example: When transmitting data of the following format, the control registers should be set
as described below. This explanation applies to Channel 0.
Transmission direction (transmission rate: 2400 bps at fc = 12.288 MHz)
start
bit 0
1
2
3
5
4
6
even
parity
stop
* Clock state
System clock: High frequency (fc)
Clock gear: 1 (fc)
Prescaler clock: System clock
7 6 5 4 3 2 1 0
PCCR
←
−
−
− − − −
−
1
PCFC
←
−
−
− − − −
−
1
Set PC0 to function as the TXD0 pin.
SC0MOD
←
X 0
−
X 0 1 0 1
Select 7-Bit UART Mode.
SC0CR
←
X 1 1 X X X 0 0
Add even parity.
BR0CR
←
0 0 1 0 0 1 0 1
Set the transfer rate to 2400 bps.
INTES0
←
1 1 0 0
− −
−
−
Enable the INTTX0 interrupt and set it to Interrupt Level 4.
SC0BUF
←
* * * * * * * *
Set data for transmission.
(note): X = Don’t care; “
−
” = No change
(3) Mode 2 (8-Bit UART Mode)
8-Bit UART Mode is selected by setting SC0MOD0<SM1, SM0> to 10. In this mode, a parity bit
can be added (use of a parity bit is enabled or disabled by the setting of SC0CR<PE>); whether even
parity or odd parity will be used is determined by the SC0CR<EVEN> setting when SC0CR<PE> is
set to 1 (enabled).
Setting example: When receiving data of the following format, the control registers should be set as
described below.
Transmission direction (transmission rate: 9600 bps at fc = 12.288 MHz)
start
bit 0
1
2
3
5
4
6
odd
parity
stop
7