t81l0010b TM Technology Inc., t81l0010b Datasheet - Page 8

no-image

t81l0010b

Manufacturer Part Number
t81l0010b
Description
T81l0010b 8-bit Mcu With Embedded Eeprom
Manufacturer
TM Technology Inc.
Datasheet
Multiprocessor Communications
The 9
serial port interrupt will be activated only if RB8 = ‘1’. This feature is enabled by setting bit SM2 in SCON. A way to use
this feature in multiprocessor systems is as follows: When the master processor wants to transmit a block of data to one of
several slaves, it first sends out an address byte which identifies the target slave. An address byte differs from a data byte in
that the 9th bit is ‘1’ in an address byte and ‘0’ in a data byte. With SM2 = ‘1’, no slave will be interrupted by a data byte. An
address byte, however, will interrupt all slaves, so that each slave can examine the received byte and see if it is being
addressed. The addressed slave will clear its SM2 bit and prepare to receive the data bytes that will be coming. The slaves
that weren’t being addressed leave their SM2s set and go on about their business, ignoring the coming data bytes.
SM2 = ‘1’, the receive interrupt will not active unless a valid stop bit is received.
Serial Port Control Register
contains not only the mode selection bits, but also the 9th data bit for transmit and receive (TB8 and RB8), and the serial port
interrupt bits (TI and RI).
Baud Rates
the value of bit SMOD in Special Function Register PCON. If SMOD = ‘0’ (which is the value on reset), the baud rate is 1/64
the oscillator frequency. If SMOD = ‘1’, the baud rate is 1/32 the oscillator frequency.
Mode 2 Baud Rate =2
In the T81L0010B, the baud rates in Modes 1 and 3 are determined by the Timer 1 overflow rate.
Using Timer 1 to Generate Baud Rates
When Timer 1 is used as the baud rate generator, the baud rates in Modes 1 and 3 are determined by the Timer 1 overflow
rate and the value of SMOD as follows:
Mode 1, 3 Baud Rate =2
The Timer 1 interrupt should be disabled in this application. The Timer 1 itself can be configured for either “timer” or
“counter” operation, and in any of its 3 running modes. In the most typical applications, it is configured for “timer” operation,
in the auto-reload mode (high nibble of TMOD = 0010B). In that case the baud rate is given by the formula:
Mode 1, 3 Baud Rate =2
One can achieve very low baud rates with Timer 1 by leaving the Timer 1 interrupt enabled, and configuring the Timer to run
as a 16-bit timer (high nibble of TMOD = 0001B), and using the Timer 1 interrupt to do a 16-bit software reload.
MSB
Where SM0, SM1 specify the serial port mode, as follows:
Interrupt Enable Register : IE
MSB
EA
wdt IE.6
ET2 IE.5
ES
ET1 IE.3
EX1
ET0 IE.1
EX0
TM Technology Inc. reserves the right
to change products or specifications without notice.
SM0 SM1
0
0
1
1
SM0
EA
tm
Modes 2 and 3 have a special provision for multiprocessor communications. In these modes, 9 data bits are received.
th
SM2 has no effect in Mode 0, in Mode 1 can be used to check the validity of the stop bit. In
The serial port control and status register is the Special Function Register SCON, shown in Figure 11. This register
The baud rate in Mode 0 is fixed: Mode 0 Baud Rate = Oscillator Frequency / 12. The baud rate in Mode 2 depends on
IE.4
IE.7
one goes into RB8. Then comes a stop bit. The port can be programmed such that when the stop bit is received, the
individually enabled or disabled by setting or clearing its enable bit.
0
1
0
1
IE.2
IE.0
Watchdog timer refresh flag.
Enable or disable the Timer 2 overflow interrupt.
Enable or disable the serial port interrupt.
Enable or disable the Timer 1 overflow interrupt.
Enable or disable the Timer 0 overflow interrupt.
Disables all interrupts. If EA = 0, no interrupt will be acknowledged. If EA = 1, each interrupt source is
SM1
Mode
wdt
Enable or disable External Interrupt 1.
Enable or disable External Interrupt 0.
0
1
2
3
CH
TE
SMOD
SMOD
SMOD
Description
shift register
8-bit UART
9-bit UART
9-bit UART
/64* (Oscillator Frequency)
SM2
/32* (Timer 1 Overflow Rate)
*(Oscillator Frequency)/ 32/12 / [256 _ (TH1)]
ET2
REN
ES
Baud Rate
f
Variable
UART F
Variable
OSC
/ 12
TB8
ET1
OSC
/64 or F
P. 8
RB8
EX1
OSC
/32
Preliminary T81L0010B
ET0
TI
Publication Date: JAN. 2006
LSB
LSB
EX0
RI
Mode 1 reception, if
Revision:A

Related parts for t81l0010b