Welcome to PLD World! 欢迎来到可编程逻辑器件的世界! http://pld.126.com

 

FreeCore Function #2:
Compact UART, Transmitter Module
Module name: cuart_tx
Current release: version 1.0, April 4, 1997
Contributed by: Rune Baeverrud

The Compact UART will give you UART (Universal Asynchronous Receiver Transmitter) functionality with a minimum of space requirements. The Compact UART is fully LPM parameterizable and will never waste space on unused functionality. With the Compart UART, you may build UARTs of any word length. How about a 49-bit UART with 7 stop bits? With Compact UART, that is your decision.

Shown below is a sample schematic using the cuart_tx module:

The transmitter module is here combined with the div_by_n module, also found in the FreeCore Library. Data is sent out with a speed of 66MHz/6875 = 9600bps. A possible bottleneck here is the divider function, which contains a counter large enough to accomodate a count value of 6875. A solution to this bottleneck problem is to cascade several smaller div_by_n modules.

Module Description

Interfacing to cuart_tx is very straight-forward, and the description of the pins and parameters are given below. A reference design using the transmitter and receiver module, and combining them with a microprocessor interface, is also available in the FreeCore Library.

PARAMETERS
MSB_FIRST Determines if data is sent with most significant bit first or least significant bit first. Default value is "YES".
STOP_BITS Number of stop bits to send trailing each data word.
WIDTH Data Width. The data width may be any number equal to or larger than 2.
INPUT PORTS
SysClk System clock input.
BaudGen Baud rate generator input. Data will be sent in the same rate as BaudGen.
Load Loads a new data word from Din[] into the Transmitter Module and starts transmitting. If a transmission is in progress, the Load input will be ignored.
D[] Parallel data input.
OUTPUT PORTS
TxD Serial data output.
TxBusy If 1, a transmission is pending, and Load will be ignored until transmission is complete and TxBusy returns to 0.

返回


 

 编辑设计: 胡晟  技术顾问: 朱仁昌 Copyright 1999-2000 PLD World    http://pld.126.com