欢迎访问ic37.com |
会员登录 免费注册
发布采购

C8051F502-IM 参数 Datasheet PDF下载

C8051F502-IM图片预览
型号: C8051F502-IM
PDF下载: 下载PDF文件 查看货源
内容描述: 混合信号ISP功能的Flash MCU系列 [Mixed Signal ISP Flash MCU Family]
分类和应用: 微控制器和处理器外围集成电路PC时钟
文件页数/大小: 312 页 / 2813 K
品牌: SILICON [ SILICON ]
 浏览型号C8051F502-IM的Datasheet PDF文件第239页浏览型号C8051F502-IM的Datasheet PDF文件第240页浏览型号C8051F502-IM的Datasheet PDF文件第241页浏览型号C8051F502-IM的Datasheet PDF文件第242页浏览型号C8051F502-IM的Datasheet PDF文件第244页浏览型号C8051F502-IM的Datasheet PDF文件第245页浏览型号C8051F502-IM的Datasheet PDF文件第246页浏览型号C8051F502-IM的Datasheet PDF文件第247页  
C8051F50x-F51x  
24. UART0  
UART0 is an asynchronous, full duplex serial port offering a variety of data formatting options. A dedicated  
baud rate generator with a 16-bit timer and selectable prescaler is included, which can generate a wide  
range of baud rates (details in Section “24.1. Baud Rate Generator” on page 243). A received data FIFO  
allows UART0 to receive up to three data bytes before data is lost and an overflow occurs.  
UART0 has six associated SFRs. Three are used for the Baud Rate Generator (SBCON0, SBRLH0, and  
SBRLL0), two are used for data formatting, control, and status functions (SCON0, SMOD0), and one is  
used to send and receive data (SBUF0). The single SBUF0 location provides access to both transmit and  
receive registers. Writes to SBUF0 always access the Transmit register. Reads of SBUF0 always  
access the buffered Receive register; it is not possible to read data from the Transmit register.  
With UART0 interrupts enabled, an interrupt is generated each time a transmit is completed (TI0 is set in  
SCON0), or a data byte has been received (RI0 is set in SCON0). The UART0 interrupt flags are not  
cleared by hardware when the CPU vectors to the interrupt service routine. They must be cleared manually  
by software, allowing software to determine the cause of the UART0 interrupt (transmit complete or receive  
complete). If additional bytes are available in the Receive FIFO, the RI0 bit cannot be cleared by software.  
TX  
Logic  
Data Formatting  
TX0  
Baud Rate Generator  
SMOD0  
SBRLH0 SBRLL0  
Overflow  
TX Holding  
Register  
Pre-Scaler  
(1, 4, 12, 48)  
SYSCLK  
Timer (16-bit)  
EN  
Write to SBUF0  
Read of SBUF0  
SBUF0  
Control / Status  
SCON0  
RX FIFO  
(3 Deep)  
SBCON0  
RX  
RX0  
Logic  
UART0  
Interrupt  
Figure 24.1. UART0 Block Diagram  
24.1. Baud Rate Generator  
The UART0 baud rate is generated by a dedicated 16-bit timer which runs from the controller’s core clock  
(SYSCLK) and has prescaler options of 1, 4, 12, or 48. The timer and prescaler options combined allow for  
a wide selection of baud rates over many clock frequencies.  
The baud rate generator is configured using three registers: SBCON0, SBRLH0, and SBRLL0. The  
UART0 Baud Rate Generator Control Register (SBCON0, SFR Definition 24.4) enables or disables the  
baud rate generator, selects the clock source for the baud rate generator, and selects the prescaler value  
for the timer. The baud rate generator must be enabled for UART0 to function. Registers SBRLH0 and  
SBRLL0 contain a 16-bit reload value for the dedicated 16-bit timer. The internal timer counts up from the  
reload value on every clock tick. On timer overflows (0xFFFF to 0x0000), the timer is reloaded. The baud  
rate for UART0 is defined in Equation 24.1, where “BRG Clock” is the baud rate generator’s selected clock  
source. For reliable UART operation, it is recommended that the UART baud rate is not configured for  
baud rates faster than SYSCLK/16.  
Rev. 1.1  
243  
 复制成功!