196
Table 2. SCI1 Control Registers
Designa-
tion
ADDR
PF
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
SCICCR
1050h
P050
STOP
BITS
EVEN/ODD
PARITY
PARITY
ENABLE
ASYNC/
ISOSYNC
ADDRESS/
IDLE WUP
SCI
CHAR2
SCI
CHAR1
SCI
CHAR0
SCICTL
1051h
P051
—
—
SCI SW
RESET
CLOCK
TXWAKE
SLEEP
TXENA
RXENA
BAUD
MSB
1052h
P052
BAUDF
(MSB)
BAUDE
BAUDD
BAUDC
BAUDB
BAUDA
BAUD9
BAUD8
BAUD LSB
1053h
P053
BAUD7
BAUD6
BAUD5
BAUD4
BAUD3
BAUD2
BAUD1
BAUD0
(LSB)
TXCTL
1054h
P054
TXRDY
TX
EMPTY
—
—
—
—
—
SCI TX
INT ENA
RXCTL
1055h
P055
RX
ERROR
RXRDY
BRKDT
FE
OE
PE
RXWAKE
SCI RX
INT ENA
1056h
P056
Reserved
RXBUF
1057h
P057
RXDT7
RXDT6
RXDT5
RXDT4
RXDT3
RXDT2
RXDT1
RXDT0
1058h
P058
Reserved
TXBUF
1059h
P059
TXDT7
TXDT6
TXDT5
TXDT4
TXDT3
TXDT2
TXDT1
TXDT0
105A
h
P05A
105B
h
P05B
Reserved
105C
h
P05C
SCIPC1
105D
h
P05D
—
—
—
—
SCICLK
DATA IN
SCICLK
DATA OUT
SCICLK
FUNCTION
SCICLK
DATA DIR
SCIPC2
105E
h
P05E
SCITXD
DATA IN
SCITXD
DATA OUT
SCITXD
FUNCTION
SCITXD
DATA DIR
SCIRXD
DATA IN
SCIRXD
DATA OUT
SCIRXD
FUNCTION
SCIRXD
DATA DIR
SCIPRI
105Fh
P05F
SCI
STEST
SCITX
PRIORITY
SCIRX
PRIORITY
SCI
ESPEN
—
—
—
—
Automatic Baud Rate Calculation
The automatic baud rate routine automatically calculates the baud for the SCI port by timing the length of
the start bit. This eliminates the need for external select switches, which can cause confusion.
The routine converts the SCIRXD pin to a general-purpose input pin and then samples this pin until it finds
the start bit. Sampling is controlled by the baud counter, which takes 32 cycles for one complete count. At
each count or every 32 cycles, the input pin is sampled. When the start bit is received, its low state is sampled
until the high state of the first data bit (of an odd ASCII value) is detected. The baud register figures the
bit rate according to the number of times the start bit is sampled. Refer to Figure 3 as you examine the
routine.
Automatic Baud Rate Routine
NOTE:
This routine is written for the SCI1 Module. Minor modifications may be
necessary when using the SCI2 Module.
SCICCR
.EQU
P050
;SCI communication control register
SCICTL
.EQU
P051
;SCI control register
BAUDMSB
.EQU
P052
;Baud counter MSB
*
Summary of Contents for TMS370 Series
Page 1: ...TMS370 Microcontroller Family Application Book 1996 8 Bit Microcontroller Family ...
Page 2: ...Printed in U S A February 1996 SPNA017 ...
Page 3: ...1996 Application TMS370 Microcontroller Family Book ...
Page 20: ...1 Part I Introduction ...
Page 21: ...2 ...
Page 22: ...3 Introduction Microcontroller Products Semiconductor Group Texas Instruments ...
Page 23: ...4 ...
Page 25: ...6 ...
Page 27: ...8 ...
Page 29: ...10 ...
Page 31: ...12 ...
Page 33: ...14 ...
Page 37: ...18 ...
Page 39: ...20 ...
Page 41: ...22 ...
Page 43: ...24 ...
Page 45: ...26 ...
Page 47: ...28 ...
Page 49: ...30 ...
Page 81: ...62 ...
Page 82: ...63 Clear RAM Microcontroller Products Semiconductor Group Texas Instruments ...
Page 83: ...64 ...
Page 85: ...66 ...
Page 86: ...67 RAM Self Test on the TMS370 Microcontroller Products Semiconductor Group Texas Instruments ...
Page 87: ...68 ...
Page 89: ...70 ...
Page 90: ...71 ROM Checksum on the TMS370 Microcontroller Products Semiconductor Group Texas Instruments ...
Page 91: ...72 ...
Page 95: ...76 ...
Page 97: ...78 ...
Page 98: ...79 Bubble Sort With the TMS370 Microcontroller Products Semiconductor Group Texas Instruments ...
Page 99: ...80 ...
Page 101: ...82 ...
Page 103: ...84 ...
Page 105: ...86 ...
Page 109: ...90 ...
Page 115: ...96 ...
Page 117: ...98 ...
Page 119: ...100 ...
Page 121: ...102 ...
Page 125: ...106 ...
Page 127: ...108 ...
Page 207: ...188 ...
Page 209: ...190 ...
Page 211: ...192 ...
Page 213: ...194 ...
Page 219: ...200 ...
Page 221: ...202 ...
Page 313: ...294 ...
Page 315: ...296 ...
Page 319: ...300 ...
Page 323: ...304 ...
Page 324: ...305 T1PWM Set Up Routines Microcontroller Products Semiconductor Group Texas Instruments ...
Page 325: ...306 ...
Page 327: ...308 ...
Page 329: ...310 ...
Page 331: ...312 ...
Page 387: ...368 ...
Page 389: ...370 ...
Page 393: ...374 ...
Page 395: ...376 ...
Page 396: ...377 PACT Command Macros Microcontroller Products Semiconductor Group Texas Instruments ...
Page 397: ...378 ...
Page 403: ...384 ...
Page 405: ...386 ...
Page 459: ...440 ...
Page 461: ...442 ...
Page 467: ...448 ...
Page 469: ...450 ...
Page 471: ...452 ...
Page 475: ...456 ...
Page 477: ...458 ...
Page 479: ...460 ...
Page 483: ...464 ...
Page 485: ...466 ...
Page 487: ...468 ...
Page 491: ...472 ...
Page 492: ...473 Part V External Memory Expansion Examples ...
Page 493: ...474 ...
Page 495: ...476 ...
Page 497: ...478 ...
Page 499: ...480 ...
Page 513: ...494 ...
Page 515: ...496 ...
Page 521: ...502 ...
Page 523: ...504 ...
Page 525: ...506 ...
Page 545: ...526 ...
Page 547: ...528 ...