Uart Implementation: Harish Madupu 114513
Uart Implementation: Harish Madupu 114513
By
transmitter) module provides asynchronous serial communication with external devices such as modems and other computers The UART can be used to control the process of breaking parallel data from the PC down into serial data that can be transmitted and vice versa for receiving data. The UART allows the devices to communicate without the need to be synchronized
HARISH MADUPU 114513
HARISH MADUPU
114513
Transmitter Pins
Mclkx16 => Master input clock for internal baud
rate generation
HARISH MADUPU
114513
Clock division
There should be a clock divider running at 16 times the
baud rate driving the UART modules. The transmitter and receiver modules with a clock divider inside runs 16 times slower than the clock signal sent to it. If for example, you want to transmit at 33.6 kbps and the FPGA board runs at 25.175 MHz then: Baud rate x 16 = 33600 x 16 = 537600 Clock division ratio = 25175000 / 537600 = 46 Clock divisor = 46 / 2 = 23 Therefore, the clock divider used to clock the UART would have a divisor of 23. This would give a transmission rate of about 34.2 kbps.
HARISH MADUPU 114513
Transmitter Pins
Reset => Master reset
HARISH MADUPU
114513
Transmitter Pins
Txrdy => Indicates new data has been written to
the transmitter
HARISH MADUPU
114513
Transmitter Pins
Write => Active low strobe signal, used for
HARISH MADUPU
114513
Transmitter Pins
data (7 down to 0) => Bi-directional data bus for
HARISH MADUPU
114513
Transmitter Pins
Tx => Transmitter serial output. Held high when
HARISH MADUPU
114513
Transmission Format
This implementation of the UART transmits in
blocks of 11 bits
HARISH MADUPU
114513
bit indicates to the receiving UART that a new sequence of data is on its way The parity can be set as even or odd and is used to indicate whether or not there has been an error in the received data bits The data is transmitted LSB first
HARISH MADUPU
114513
Receiver Pins
Parityerr => Indicates whether a parity error was
HARISH MADUPU
114513
Receiver Pins
Framingerr => Indicates if the serial data format sent
to the rx input did not match the proper UART data format
HARISH MADUPU
114513
Receiver Pins
Overrun => Indicates whether new data sent in is
overwriting the previous data received that has not been read out yet.
HARISH MADUPU
114513
Receiver Pins
Rxrdy => Indicates new data has been received
HARISH MADUPU
114513
Receiver Pins
Read => Active low strobe signal, used for
HARISH MADUPU
114513
Receiver Pins
Rx => Receiver serial input. Pulled-up when no
HARISH MADUPU
114513
Implementational Architecture
HARISH MADUPU
114513
Process of Transmission
transmitting data through the UART begins by first
checking the txrdy line. A high txrdy signal indicates that new data can be written to the transmitter To write to the transmitter place the data to be transmitted on the data line. The data is then latched into the UART's transmit module by a leading low signal to the write line. The next data sequence can be latched once the txrdy line goes high again.
HARISH MADUPU
114513
Process of Transmission
while not transmitting, the data line must not be
driven but left floating to avoid dealing with tri-state buffers, modify the UART module by giving it separate parallel input and output ports.
HARISH MADUPU
114513
Transmitter Entity
Pi => data (7 downto 0) Clk => Mclkx16 Wrt => Write
HARISH MADUPU
114513
Initializing Transmitter
Txrdy signal will be high for every 16 clock cycles.
HARISH MADUPU
114513
HARISH MADUPU
114513
transmitted serially
HARISH MADUPU
114513
Transmitter Output
HARISH MADUPU
114513
Process of reception
The process of receiving data through the UART
begins by waiting for the rxrdy line to go high. A high rxrdy indicates that data has been received and is ready to be read out. To read the data out from the UART's data line assert a low signal to the read line. This will latch the received data from the receiver to the data line allowing you to read it.
HARISH MADUPU
114513
Process of Reception
The parityerr, framingerr, and overrun lines
indicate any problems with the current received data The next data received can be read out once rxrdy goes high again.
HARISH MADUPU
114513
Receiver Entity
HARISH MADUPU
114513
Expected results
Receiver output
HARISH MADUPU
114513
HARISH MADUPU
114513