Design and Simulation of UART for Serial Communication

Similar documents
PERFORMANCE OF DMA MODE UART IP SOFT CORE IN EMBEDDED SYSTEMS

FULL DUPLEX BIDIRECTIONAL UART COMMUNICATION BETWEEN PIC MICROCONTROLLERS

UART IP CORE VERIFICATION BY USING UVM

Laboratory Finite State Machines and Serial Communication

International Journal of Research in Advent Technology IMPLEMENTATION OF UNIVERSAL ASYNCHRONOUS RECEIVER TRANSMITTER BASED ON VHDL

VHDL based Serial Communication Interface Inspired by 9-Bit Uart

Optimal Implementation Of UART_SPI Controller and Slave Interface With Master.

FPGA-BASED DATA ACQUISITION SYSTEM WITH RS 232 INTERFACE

Fig.12.5 Serial Data Line during Serial Communication

Serial Communication Prof. James L. Frankel Harvard University. Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved.

DESIGN AND VERIFICATION OF UART USING VERILOG HDL

Basics of UART Communication

Universal Asynchronous Receiver/Transmitter Core

RECONFIGURABLE SPI DRIVER FOR MIPS SOFT-CORE PROCESSOR USING FPGA

Design And Implementation Of USART IP Soft Core Based On DMA Mode

MCS-51 Serial Port A T 8 9 C 5 2 1

8051 Serial Communication

UART Register Set. UART Master Controller. Tx FSM. Rx FSM XMIT FIFO RCVR. i_rx_clk o_intr. o_out1 o_txrdy_n. o_out2 o_rxdy_n i_cs0 i_cs1 i_ads_n

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Communication Module No: CS/ES/11 Quadrant 1 e-text

DESIGN AND IMPLEMENTATION OF I2C SINGLE MASTER ON FPGA USING VERILOG

Controller IP for a Low Cost FPGA Based USB Device Core

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features

ISSN: [Vani* et al., 5(11): November, 2016] Impact Factor: 4.116

Configurable UART with FIFO ver 2.20

Hardware Design of Safety Arming Mechanism using FPGA

ECE251: Thursday November 8

Asynchronous Transmission. Asynchronous Serial Communications & UARTS

Using UART in radio data transmission with the CDP-02 module By Tomihiko Uchikawa

International Journal of Engineering Trends and Technology (IJETT) Volume 6 Number 3- Dec 2013

Design and Implementation of Multi-Rate Encryption Unit Based on Customized AES

Design and Implementation of Hamming Code on FPGA using Verilog

Lecture-65 SERIAL DATA COMMMUNICATION The data bus of a microcomputer system is designed to transfer data to and from I/O device in parallel - all

DESIGN AND IMPLEMENTATION OF VLSI SYSTOLIC ARRAY MULTIPLIER FOR DSP APPLICATIONS

Keywords: Soft Core Processor, Arithmetic and Logical Unit, Back End Implementation and Front End Implementation.

International Journal of Advance Engineering and Research Development DESIGN AND IMPLEMENTATION OF SPI PROTOCOL

FPGA Implementation of High Speed AES Algorithm for Improving The System Computing Speed

Amarjeet Singh. January 30, 2012

Configurable UART ver 2.10

of Soft Core Processor Clock Synchronization DDR Controller and SDRAM by Using RISC Architecture

HIGH-PERFORMANCE RECONFIGURABLE FIR FILTER USING PIPELINE TECHNIQUE

THE INTERNATIONAL JOURNAL OF SCIENCE & TECHNOLEDGE

Concepts of Serial Communication

RESET CLK RDn WRn CS0 CS1 CS2n DIN[7:0] CTSn DSRn DCDn RXDATA Rin A[2:0] DO[7:0] TxDATA DDIS RTSn DTRn OUT1n OUT2n BAUDOUTn TXRDYn RXRDYn INTRPT

DESIGN AND VERIFICATION OF LOW SPEED PERIPHERAL SUBSYSTEM SUPPORTING PROTOCOLS LIKE SPI, I 2 C AND UART

UART Implementation Using the N2HET

Sender Receiver Sender

Serial Communication. Spring, 2018 Prof. Jungkeun Park

i_csn i_wr i_rd i_cpol i_cpha i_lsb_first i_data [15:0] o_data [15:0] o_tx_ready o_rx_ready o_rx_error o_tx_error o_tx_ack o_tx_no_ack

Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels.

HP 48 I/O Technical Interfacing Guide

PROJECT REPORT - UART

DESIGN AND IMPLEMENTATION OF SDR SDRAM CONTROLLER IN VHDL. Shruti Hathwalia* 1, Meenakshi Yadav 2

Serial Communications

Hardware Description of Multi-Directional Fast Sobel Edge Detection Processor by VHDL for Implementing on FPGA

Implementation of Optimized ALU for Digital System Applications using Partial Reconfiguration

8051SERIAL PORT PROGRAMMING

HCTL Open Int. J. of Technology Innovations and Research HCTL Open IJTIR, Volume 4, July 2013 e-issn: ISBN (Print):

CoE3DJ4 Digital Systems Design. Chapter 5: Serial Port Operation

Design and Simulation of 32 bit Floating Point FFT Processor Using VHDL

Design and Verification of Serial Peripheral Interface 1 Ananthula Srinivas, 2 M.Kiran Kumar, 3 Jugal Kishore Bhandari

Design of Convolution Encoder and Reconfigurable Viterbi Decoder

D16750 IP Core. Configurable UART with FIFO v. 2.25

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Serial Communication. Simplex Half-Duplex Duplex

School of Computer Science Faculty of Engineering and Computer Science Student ID Number. Lab Cover Page. Lab Date and Time:

Reconfigurable PLL for Digital System

Serial Interfacing. Pulse width of 1 bit

DESIGN AND SIMULATION OF UART SERIAL COMMUNICATION PROTOCOL BASED ON VHDL

UART TO SPI SPECIFICATION

International Journal of Applied Sciences, Engineering and Management ISSN , Vol. 05, No. 02, March 2016, pp

Serial Communications

10GBase-R PCS/PMA Controller Core

2. BLOCK DIAGRAM Figure 1 shows the block diagram of an Asynchronous FIFO and the signals associated with it.

International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December ISSN

AREA OPTIMIZATION OF SPI MODULE USING VERILOG HDL

Serial Interfacing. Asynchronous Frame

International Conference on Information Sciences, Machinery, Materials and Energy (ICISMME 2015)

DEVELOPMENT OF FPGA MICROBLAZE PROCESSOR AND GSM BASED HEART RATE MONITORING SYSTEM

Embedded Systems and Software

Matrix Manipulation Using High Computing Field Programmable Gate Arrays

Design and Verification of Network Router

SPART. SPART Design. A Special Purpose Asynchronous Receiver/Transmitter. The objectives of this miniproject are to:

8051 Timers and Serial Port

International Journal of Research Available at

16 BIT IMPLEMENTATION OF ASYNCHRONOUS TWOS COMPLEMENT ARRAY MULTIPLIER USING MODIFIED BAUGH-WOOLEY ALGORITHM AND ARCHITECTURE.

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).

A Novel Approach for Parallel CRC generation for high speed application

Serial Communication

Asynchronous FIFO Design

Demo 17 - Receiving data from Host through Serial Port. Introduction:

OUTLINE. SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples

Input-Output Organization

Health monitoring of an power amplifier using an ethernet controller

1 The Attractions of Soft Modems

Innovati s Bluetooth 100M Universal Wireless Bluetooth Module

Lab 3 Sequential Logic for Synthesis. FPGA Design Flow.

FPGA based Design of Low Power Reconfigurable Router for Network on Chip (NoC)

ISSN Vol.02, Issue.11, December-2014, Pages:

Embedded Systems and Software. Serial Communication

Transcription:

Design and Simulation of UART for Serial Communication 1 Manju Wadhvani 1 Electronic and Telecommunication Engineering, Chhatisgarh Swami Vivekanand Technical university, Disha Institute of Management and Technology, Raipur, India manju.wadhvani@gmail.com 2 Prof. Zoonubiya Ali 2 Electronic and Telecommunication Engineering, Chhatisgarh Swami Vivekanand Technical university, Disha Institute of Management and Technology, Raipur, India zoonubiya khan@gmail.com Abstract Asynchronous serial communication is usually implemented by Universal Asynchronous Receiver Transmitter (UART), mostly used for short distance, low speed, low cost data exchange between processor and peripherals. UART allows full duplex serial communication link, and is used in data communication and control system. In parallel communication the cost as well as the complexity of the system increases due to simultaneous transmission of data bits on multiple wires. The UART simulated with VHDL language to achieve stable and reliable data transmission. This paper presents the simulation of UART with configurable baud rate. Keywords UART; Asynchronous serial communication; VHDL; simulation. I. INTRODUCTION The fact that serial communication uses a single data line instead of the 8 bit data line of parallel communication not only makes it much cheaper but also enables two computer located in to different cities to communicate over the telephone. Universal Asynchronous Receiver Transmitter (UART) is a kind of serial communication protocol; mostly used for short-distance, low speed, low-cost data exchange between computer and peripherals.serial data communication uses two methods, asynchronous and synchronous. The synchronous method transfers a block of data (character) at a time, while the asynchronous method transfers a single byte at a time. It is possible to write software to use either of these methods, but the programs can be tedious and long. For this reason, there are special IC chips made by many manufacturers for serial data communications. These chips are commonly referred to as UART i.e; Universal Asynchronous Receiver Transmitter. Asynchronous serial data communication is widely used for character- oriented transmissions, while block oriented data transfer use the synchronous method. [1] Universal Asynchronous receiver transmitter (UART) is mostly used for the exchange of data communication between computer and peripherals which is a serial communication protocol. Specifically, it provides the computer with the RS-232C Data Terminal Equipment (DTE) interface so that it can "talk" to and exchange data with modems and other serial devices.[2] It handles the conversion between serial and parallel data. Serial communication reduces the distortion of a signal, therefore makes data transfer between two systems separated in great distance possible. UART design mainly contains three blocks those are Transmitter, Receiver and Baud Rate Generator. Transmitter performs a parallel-to serial conversion for data transmission from the computer and the Receiver performs serial to parallel conversion for data coming in via the serial line. The baud rate generator is used to produce a local clock signal which is much higher than the baud rate to control the UART receive and transmit. In addition to the basic job of converting data from parallel to serial for transmission and from serial to parallel on reception, a UART will usually provide additional circuits for signals that can be used to indicate the state of the transmission media and to regulate the flow of data in the event that the remote device is not prepared to accept more data. UART must have a larger internal buffer to store data coming from the modem until the CPU has time to process it.[3] ISSN : 2319-7323 Vol. 5 No.03 May 2016 151

Baud Rate Generator Receiver Module Transmitter Module Figure 1. UART Module II. UART DATA FRAME FORMAT UART transmit and receive data format shown in Figure 2, usually include start bit, data bit, parity bit, stop bit and idle state. Start bit is the beginning of data transmission. When the transmitter sends a character data, a logic "0" signal is firstly send, which is the start bit, and the time width is a baud rate clock cycle. Start bit is followed by data bits, which are usually from 5 to 8 bits. The data bit from the least significant bit (LSB) begin to send. The data bits can be parity bit, which can be odd or even parity, as well as no parity bit. The parity bit or data bit (when no parity bit) is followed by stop bits, which are logic "1" signal containing 1,1.5 or 2 bits. Stop bits are the end of a data. Idle state is a logic "1 ".This data frame format is adopted by the start bit and stop bit to achieve character synchronization. UART has an internal configuration register, in which user can set the data bits, whether there is parity bit, as well as the type of parity and stop bits.[4] Figure 2. UART Frame Format III. UART IMPLEMENTATION BY USING VHDL UART design mainly contains three blocks those are Transmitter, Receiver and Baud Rate Generator, plus two status registers tx_busy and rx_busy as shown in Fig. 3. The baud generator deals with the generation of baud frequency clock pulses from the input clock. The transmitter and receiver block, which perform the data transfer, are independent of each other and hence this design can achieve full duplex communication. 1 )Baud Generator : The baud generator is used to produce a local clock signal which is much higher than the baud rate to control theuart receive and transmit. It is a actually a frequency divider. The baud frequency factor can be calculated according to the given system clock frequency and the requested baud rate. In this design, the frequency clock produced by the baud rate generator is not the baud rate clock, but 16 times the baud rate clock. The faster clock allows the receiver to align the sampling pulse as desired and provides a faster response time from the transmitter. The baud clock frequency and the baud limit are calculated as per given Equations. 16. BR Baud_Freq Baud Limit gcd Clock_Freq, 16. BR _ _,. Baud_Freq ISSN : 2319-7323 Vol. 5 No.03 May 2016 152

Tx data Tx_hold_reg New _tx_data Tx_busy Transmitter ser_out baud_clk_16 Baud_Generator baud_clk_16 Clock New _rx_data Rx_busy Receiver ser_in Rx data Figure 3. UART Block Diagram Rx_hold_reg 2) Transmitter block: The function of transmit module is to convert the sending 8 bit parallel data into serial data, adds start bit at the head of the data as well as parity and stop bits at the end of the data. A new data transfer in the UART is initiated by the new tx data, which indicates the availability of the tx data. This data is stored in the tx hold reg in the next clock cycle. The parallel stream of data (tx data) is converted into a serial stream using a shift register. The start of the shift operation sets the internal status register tx busy to indicate a new data transfer. tx busy can also be used as data validity signal for clock gating the transmitter block. The shift operation follows at the baud clock frequency to send the data out on the ser out data line. A counter of 16 is used to generate the rising edge for the baud clock from the 16 the baud clock provided by the baud generator. The status ofany data transfer is maintained by a status register to indicate a valid/invalid operation indicated by an interrupt signal. The resetting of the tx busy status register is detected by another counter of 10 which counts the number of bits transmitted. Figure 4. Transmitter Block 3) Receiver Block: During the UART reception, the serial data and the receiving clock are asynchronous, so it is very important to correctly determine the start bit of a frame data. This block monitors the input line for the new data which is indicated by the start bit. The rx_busy register is set when the start bit is recognized. This block operates at two different edges of the baud clock pulse generated by a 16 bit shift counter from the 16 baud clock. The sampling and shifting at the shift register occurs atthe middle of the incoming data pulse at the falling edge of the baud clock pulse which is generated at the count of 8 from the counter. After receiving the end bit of the ser in data, the serial data is moved to the rx hold reg register at the rising edge of the baud clock frequency generated at the count of 16 on the counter. Thus a parallel stream of 8-bit data (rx data) is generated which is indicated by the new_rx_data interrupt signal. There is also 3-bit counter to track the number of input bits received.[5,6,7] ISSN : 2319-7323 Vol. 5 No.03 May 2016 153

Figure 5. Receiver Block IV. SIMULATION RESULT AND RTL VIEW OF TOP FILE In this paper, the system clock frequency is 50 MHZ, baud rate is 19200bps and then the output clock frequency of baud rate generator should be 1*19200. Therefore the frequency coefficient (M) =50 MHZ/1*19200=2604 Figure 6. RTL View Of Top File The simulation result shows the serial transmission and reception of 8 bit data.we have selected S0=1 and S1=0 to select the baud rate of 19200bps. It shows the output for the selected baud rate. In this paper we transmit 11001100 and at the receiver side we get the same output. Figure 7. Simulation Waveform ISSN : 2319-7323 Vol. 5 No.03 May 2016 154

V. RESULT The proposed UART has been simulated and synthesized on the Xilinx ISE 14.2. and the desired output as shown in the figure which shows the transmission of 8 bit data. The synthesis result contains a table which shows the comparison between the old research and the proposed UART. While doing comparison we will find that our research shows great significance as our parameter is consuming less power to operate. Device Utilization Summary Logic Utilization No. of Slice Registers No. of Slice LUTS No. of Fully used LUT- FF pairs No. of Bonded IOBS Used available utilization 19 4800 0% 23 2300 0% 19 24 82% 14 102 13% Table 1. Synthesis Result ACKNOWLEDGMENT We would like to acknowledge the faculties of Electronic & Telecommunication department, Disha college of Engineering and Technology, Raipur for their support. I Manju Wadhvani specially want to thank my guide professor and H.O.D. Zoonubiya Ali for their valuable guidance and constant encouragement towards the work. REFERENCES [1] Patel; Vatsalkumar Patel; Vikaskumar Patel, VHDL Implementation of UART with Status Register, Sarvajanik College of Engg & Tech Surat, India. [2] Chun-zhi Xia Yin-shui Wang Lun-yao A Universal Asynchronous Receiver Transmitter Design 978-1-4577-0321- 8/11/26.00 2011 IEEE. [3] FANG Yi-yuan, CHEN Xue-jun Design and Simulation of UART Serial Communication Module based on VHDL 978-1-4244-9857-4/11/26.00 2011 IEEE. [4] Ms. Neha R. Laddha, Prof. A.P. Thakare Implementation of Serial Communication using UART with configurable baud rate International Journal on Recent and Innovation Trends in Computing and Communication volume1 Issue: 4 April 2013. [5] Mangesh V. Benodkar, Prof. Umesh W. Hore Design and simulation of Universal Asynchronous Receiver Transmitter on Field Programmable Gate Array Using VHDL International Journal of Scientific Research Education volume:2 Issue: 7 July 2014. [6] Dipanjan Bhadra, Vikas S.Vij, Kenneth S. Stevens A Low Power UART Design Based On Asynchronous Techniques 978-1-4799-00666-4/13/31.00 2013 IEEE. [7] B.Venkataramana, P.Shrikanth Reddy, P. kishore Kumar, Prof. K Sivasankaran ASIC Implementation of Universal Asynchronous Receiver Transmitter using 45nm Technology International Journal of Engineering and Technology volume:5 Issue: 3 July 2013. ISSN : 2319-7323 Vol. 5 No.03 May 2016 155