參數(shù)資料
型號(hào): XA-G39
廠商: NXP Semiconductors N.V.
英文描述: XA 16-bit microcontroller family XA 16-bit microcontroller 32K FLASH/1K RAM, watchdog, 2 UARTs
中文描述: 的XA 16位微控制器系列的XA 16位微控制器32K的FLASH/1K內(nèi)存,看門狗,2個(gè)UART
文件頁數(shù): 26/42頁
文件大小: 217K
代理商: XA-G39
Philips Semiconductors
Preliminary data
XA-G39
XA 16-bit microcontroller family
32K Flash/1K RAM, watchdog, 2 UARTs
2002 Mar 13
26
Serial Port Control Register
The serial port control and status register is the Special Function
Register SnCON, shown in Figure 16. This register contains not only
the mode selection bits, but also the 9th data bit for transmit and
receive (TB8_n and RB8_n), and the serial port interrupt bits (TI_n
and RI_n).
TI Flag
In order to allow easy use of the double buffered UART transmitter
feature, the TI_n flag is set by the UART hardware under two
conditions. The first condition is the completion of any byte
transmission. This occurs at the end of the stop bit in modes 1, 2, or
3, or at the end of the eighth data bit in mode 0. The second
condition is when SnBUF is written while the UART transmitter is
idle. In this case, the TI_n flag is set in order to indicate that the
second UART transmitter buffer is still available.
Typically, UART transmitters generate one interrupt per byte
transmitted. In the case of the XA UART, one additional interrupt is
generated as defined by the stated conditions for setting the TI_n
flag. This additional interrupt does not occur if double buffering is
bypassed as explained below. Note that if a character oriented
approach is used to transmit data through the UART, there could be
a second interrupt for each character transmitted, depending on the
timing of the writes to SBUF. For this reason, it is generally better to
bypass double buffering when the UART transmitter is used in
character oriented mode. This is also true if the UART is polled
rather than interrupt driven, and when transmission is character
oriented rather than message or string oriented. The interrupt occurs
at the end of the last byte transmitted when the UART becomes idle.
Among other things, this allows a program to determine when a
message has been transmitted completely. The interrupt service
routine should handle this additional interrupt.
The recommended method of using the double buffering in the
application program is to have the interrupt service routine handle a
single byte for each interrupt occurrence. In this manner the
program essentially does not require any special considerations for
double buffering. Unless higher priority interrupts cause delays in
the servicing of the UART transmitter interrupt, the double buffering
will result in transmitted bytes being tightly packed with no
intervening gaps.
9-bit Mode
Please note that the ninth data bit (TB8) is not double buffered. Care
must be taken to insure that the TB8 bit contains the intended data
at the point where it is transmitted. Double buffering of the UART
transmitter may be bypassed as a simple means of synchronizing
TB8 to the rest of the data stream.
Bypassing Double Buffering
The UART transmitter may be used as if it is single buffered. The
recommended UART transmitter interrupt service routine (ISR)
technique to bypass double buffering first clears the TI_n flag upon
entry into the ISR, as in standard practice. This clears the interrupt
that activated the ISR. Secondly, the TI_n flag is cleared
immediately following each write to SnBUF. This clears the interrupt
flag that would otherwise direct the program to write to the second
transmitter buffer. If there is any possibility that a higher priority
interrupt might become active between the write to SnBUF and the
clearing of the TI_n flag, the interrupt system may have to be
temporarily disabled during that sequence by clearing, then setting
the EA bit in the IEL register.
相關(guān)PDF資料
PDF描述
XA-G49 XA 16-bit microcontroller family 64K FLASH/2K RAM, watchdog, 2 UARTs
XA-H3 CMOS 16-bit highly integrated microcontroller
XA-H4 Single-chip 16-bit microcontroller
XACA04SPEC0304 CONTROL STATION 4WAY
XACA06SPEC0305 CONTROL STATION 6WAY
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
XA-G49 制造商:PHILIPS 制造商全稱:NXP Semiconductors 功能描述:XA 16-bit microcontroller family 64K FLASH/2K RAM, watchdog, 2 UARTs
XAGU-50A 制造商:Distributed By MCM 功能描述:Agu Fuses 50A, Package of 5 制造商:MCM 功能描述:AGU FUSES 50A 5 PACK
XAGU-60A 制造商:Distributed By MCM 功能描述:Agu Fuses 60A, Package of 5 制造商:MCM 功能描述:AGU FUSES 60A 5 PACK
XAGU-80A 制造商:Distributed By MCM 功能描述:Agu Fuses 80A, Package of 5 制造商:MCM 功能描述:AGU FUSES 80A 5 PACK
XA-H3 制造商:PHILIPS 制造商全稱:NXP Semiconductors 功能描述:CMOS 16-bit highly integrated microcontroller