微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 硬件电路设计 > TI模拟硬件电路设计 > TUSB3200A的UART我该怎么使用?

TUSB3200A的UART我该怎么使用?

时间:10-02 整理:3721RD 点击:

如题,是否UART的初始化程序兼容80C52的UART程序。可否直接用?

希望得到大家的帮助。谢谢先。

终于有点眉目了。根据该帖子发现e2e.ti.com/.../126798.aspx

是用TIMER2来做UART的。现在正在弄当中。希望顺利。

还是没有得到解决啊。但是找到如下描述。原文链接:www.keil.com/.../1517.htm

但是这一段我不理解

BaudRate

   SMOD1 (Double Baudrate) is set to double the baudrate in mode 2.

   RCLK (Receive Clock Enable) is set to use Timer 2 overflows for the receive clock. If reset, Timer 1 overflows are used.

   TCLK (Transmit Clock Enable) is set to use Timer 2 overflows for the transmit clock. If reset, Timer 1 overflows are used.

   Transmit & Receive Baudrate is the actual baudrate for the serial channel. It can be derived from the oscillator frequency, or generated by Timer 1.

哪位可以帮帮我啊。

-----------------------------------------------------------------------------------------

Peripheral Simulation

For Texas Instruments TUSB3200 — Serial UART (Enhanced Interface)

Simulation support for this peripheral or feature is comprised of:

   Dialog boxes which display and allow you to change peripheral configuration.

   VTREGs (Virtual Target Registers) which support I/O with the peripheral.

These simulation capabilities are described below.

Serial Channel Dialog

Serial Channel

The Serial Channel dialog displays and allows you to edit the configuration of the Serial Interface.

   Mode displays and allows you to change the serial interface mode of operation (data bit length and baud rate).

   SCON (Serial Control Register) holds the control and setup information for programming the serial port.

   SBUF (Serial Interface Buffer Register) contains the transmit data to be sent or received data.

   SADDR (Slave Address) when the MCU is a master, this selects a slave device for communication with another serial device.

   SADEN (Slave Address Mask) determines which bits of the slave address are used for communication with another serial device.

   SM2 (Enable Serial Port Multiprocessor Communication In Modes 2 and 3) is set to suppress a receiver interrupt (RI) if the received 9th data bit is 0.

   TB8 (Serial Port Transmitter Bit 9) is the 9th data bit to be transmitted for serial modes 2 and 3.

   RB8 (Serial Port Receiver Bit 9) is set for serial modes 2 and 3 when a 9th bit is received. In serial mode 1, this is the stop bit.

   SMOD0 (Framing Error Mode) is set to enable framing error detection.

   FE (Framing Error Detected) is set when an invalid stop bit (framing error) is detected. This bit must be reset by software.

   REN (Receiver Enable) is set to enable serial data input.

BaudRate

   SMOD1 (Double Baudrate) is set to double the baudrate in mode 2.

   RCLK (Receive Clock Enable) is set to use Timer 2 overflows for the receive clock. If reset, Timer 1 overflows are used.

   TCLK (Transmit Clock Enable) is set to use Timer 2 overflows for the transmit clock. If reset, Timer 1 overflows are used.

   Transmit & Receive Baudrate is the actual baudrate for the serial channel. It can be derived from the oscillator frequency, or generated by Timer 1.

IRQ

   TI (Transmitter Interrupt Flag) is set by hardware for each character frame transmitted. TI is cleared by software.

   RI (Receiver Interrupt Flag) is set by hardware for each character frame received. RI is cleared by software.

原来是硬件没有接好。问题已经解决。谢谢TI工程师 = =!

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top