Ieee 5 2020
Ieee 5 2020
Abstract - Universal Asynchronous Receiver Transmitter the transmitter. The first bit is called Start bit, which is ‘0’,
(UART) is an integrated circuit, which is commonly included in and the bits which follow the start bits are data bits, whose
microcontrollers and it is usually operated at a baud rate of length ranges between 5 and 7 bits. The ensuing bit is the
20Mbps, which is usually achieved by using a clock of 20MHz. parity bit. It is added as a checksum to check for any data
Due to its advantages such as high reliability, long-distance
range, and low cost, it is widely used in the data communication corruption while it travels through a channel, In the end, a stop
process, especially in serial communications over a computer or bit of ‘1’ is added to indicate the end of the frame. The data
peripheral device serial port. As indicated or hinted by the travels in a frame in the above format through a channel. The
designation of the term ‘universal’, the format and transmission data, which is captured at the receiver end, is sampled at a rate
speeds of data are configurable to achieve the required operating of 11 clock cycles per second. The captured data is then
condition(s). FIFO (First-In-First-Out) technique is used to store transferred to a shift register for accumulation. These both
the data temporarily during high-speed transmissions and it is receiver and transmitter architectures are helpful in the
also used for synchronization. Usually, the data is serially successful implementation of the UART. It may also include
transmitted one by one into the channel. The output is taken at a
different techniques to control the data flow such as the baud
sampling period of 10 clock cycles and parallel stored as the data
arrives. The results obtained from this experiment indicate that rate generator. Data conversion in UART happens at very high
the working of the proposed model can be correlated to or is speed without loss of data. The data exchanged is of American
similar to the results obtained from the theoretical approach in Standard Code for Information Interchange (ASCII) format.
the form of frame arrangement and stacking of data. This paper Besides RS-232, RS-422 and RS-485 standards have been
proposes a change in the frame format to involving the commonly applied to UART chips nowadays. This paper
microcontroller or microprocessor, which will control the proposed a modified frame format, where it made use of
operation of UART based on the extra bit(s) in the frame, to hamming code for error detection and flags for indicating the
achieve option(s) for power saving. To design such a circuit at a required action to microprocessor like resend data or stop
gate level is tedious and consumes a large amount of time due to
sending data etc. Di stands for data bit i, while Pi stands for
the increasing complexity of integrated circuit technology, hence
the use of hardware description language such as Verilog HDL is parity bit i. P3 is the extra parity bit. The frame format is as
becoming popular because it makes it easy to design a circuit of shown below:
any complexity. Verilog is pretty different from VHDL. Verilog is
not as verbose as VHDL, so that is why it is more compact and
hardware modeling is better in it than VHDL, even though it has Start P P D P D D D P er en ack Stop
a lower level of programming constructs than VHDL. bit 0 1 0 2 1 2 3 3 bit
Keywords – UART, Transmitter, Receiver, Control unit, Fig.1. T he frame format for UART
Datapath unit.
I. INT RODUCT ION The bits en, ack , and er are given as inputs by the
Data transmission is achieved through the use of UART via a microprocessor. The bit en is used by the receiver side to
serial port on the computer to transmit and receive data. indicate the transmitter to halt transmission. This doesn’t halt
Parallel-to-serial conversion is performed at the transmitter the transmission of data indefinitely. The microcontroller or
side and serial-to-parallel conversion is performed at the microprocessor will wait for time t, the time required to
receiver side. Buffer(s) are present at both the transmitter and transmit once from the transmitter to the receiver. This has to
receiver, which are used to contain data, that is the data is be coded into the microprocessor’s program. This may be due
accumulated here before being used for further processing. to various reasons, such as an error is detected or the rate of
Generally, an 8-bit long format is used to send the data from processing of data is slower than the rate of transmission and
Authorized licensed use limited to: Lulea University of Technology. Downloaded on July 17,2020 at 15:57:49 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
reception of data. The bit er is used to indicate that there was It works based on the ASMD chart. Here, the transmitter goes
an error in the transmitted data. Although a hamming code through three idle states, waiting and sending. These states are
generator is used to encode the data, there is still a chance that saved as 01, 11, and 10 respectively and the next state is
the data may be corrupted due to various factors, such as achieved by performing left shift operation on the current state
glitches or EMI, etc. At the receiver side, the program which once and the added bit, the last is the output of XOR operation
is running on the microprocessor will carry out the detection to the bits of the previous stage. When the active low reset
of errors, based on the output of the hamming code decoder. signal, rst_b, is asserted, the state machine enters an idle state,
The received data is sent back as a check to see if the received bi_count is flushed and T_shftreg is loaded with all 1’s. In this
state, if an active edge of Clock occurs while the rst_b is high,
data is correct and an acknowledgment is sent to the receiver
the system checks for Load_T_dreg. When this state is
side. The ack is used by the microprocessor to indicate the
asserted by the external host, the output signal Load_T_DR
transmitter that data is received properly without any error and will load the content of D_Bus into T_d_reg. After this, at the
that er bit is valid. The acknowledgment sent by the receiver positive edge of clock pulse the machine will check for
during the first transmission is in the form of this en and er By_ready signal. When the system asserts this signal at the
bits. positive edge of clock cycle machine enters into
Load_T_shftreg where the data register T_shftreg is filled with
II. LITERATURE SURVEY the data from T_dreg with an additional er, en and stop bit.
Implementation and working of UART and frame format are After that, the state is driven to waiting unless T_by is
important in retrieving the data bits after they are transmitted assessed at the positive edge of the clock the state remains the
into the channel [2]. Understanding of UART at the circuit same. Once T_by is asserted at the positive edge of the clock
level, the inclusion of various flags to determine the status of the state is driven to sending before which a start action will
data bits was also a motivation behind this paper [6]. The take place and data is continuously transmitted until the
operation of transmitter and receiver and utilization of the counter reaches BC_lt_BCmax (maximum allowable value).
clock dividing technique was also implemented [2]. Power Once this maximum value is reached, the stop bit is appended
analysis of a circuit helped us to understand the need of using and the registers are flushed while the state is returned to idle
minimal power when it is implemented on FPGA [1]. The (as shown in figure 3).
different number of bits and its usage in UART frame format
helped us to utilize its flexibility as much as possible [3].
Authorized licensed use limited to: Lulea University of Technology. Downloaded on July 17,2020 at 15:57:49 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
Once 11 bits are received it checks for signal from the host. If
read_not_ready_in is enabled an error signal, Error1, is
asserted and the state machine moves to the idle state. If it is
not 1 and if Ser_in is 1 an error signal, Error2, is asserted, the
state machine also moves to the idle state. If Ser_in is also
zero then load signal will be asserted and the parallel data will
be loaded into RCV_dreg which is the output passed to the
processor and the state machine moves into the idle state (as
shown in figure 5).
V. RESULT ANALYSIS
A. Transmitter Output
Here, it is observed that, when rst_b is 0 the system enters
Fig.4. Receiver Architecture Block Diagram
into reset mode where everything is set to initial condition.
When Load_T_Dreg is 1 and rst_b is 1 during a positive
Authorized licensed use limited to: Lulea University of Technology. Downloaded on July 17,2020 at 15:57:49 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
edge of the clock the system checks for By_ready. regarding the resources utilized for the implementation of
Similarly, when By_ready is 1 and rst_b is 1 at the positive transmitter and receiver architectures. Also, they provide us
edge of the clock, system checks for T_by and when T_by the insight on minimum required cells, ports, nets, LUTs
is 1 and rst_b is 1 at the positive edge of the clock the (Lookup tables), etc.
system starts transmitting data. The required data is
encoded using a hamming code generator and is passed
onto d_bus. The data present on the d_bus is transmitted
serially on serial_out. The input is represented by d_bus.
At 40ns a start bit of value 0 is sent followed by the data in
the d_bus serially. After sending the data it is observed that
a stop bit of 1 is sent to signal the end of the frame (as
shown in figure 6). A slightly modified version of the
ASMD diagram was used for testing of this ASMD
diagram since the testing was done using software tools
and no hardware was used.
B. Receiver Output
In the receiver end, when a data is received at Serial_in it
checks for 4 continuous 0’s which will signal that a start bit
received. The Sample_clk takes the input data at every 10th
clock cycle. The data received is obtained serially at the input.
RCV_datareg shows the loading of serially obtained data into
parallel form by shifting it towards LSB bit by bit. This
process takes place until the BC_eq_8 becomes 1 and passes it
to the next state. It is also seen that, when all the bits are
transmitted it sends a signal read_not_ready_out to the host
processor to stop sending data for a while. At the same time,
an Error2 signal is asserted for a while since the Serial_in data
are 0. The zero-bit received at the end is stop bit which signals
the end of the frame (as shown in figure 7). This data is sent to
a hamming code decoder which will decode the data and send
it to a microprocessor or microcontroller for further use.
Authorized licensed use limited to: Lulea University of Technology. Downloaded on July 17,2020 at 15:57:49 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
Authorized licensed use limited to: Lulea University of Technology. Downloaded on July 17,2020 at 15:57:49 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
VII. CONCLUSION
The obtained result is quite similar to that of the theoretical
approach. In the theoretical approach, the frame consists of
one start bit, followed by 5-7 data bits, one parity bit, and one-
stop bit. Here, the data are transmitted serially in almost the
same fashion but with slightly more complex architecture(s)
and frame format. On the receiver end similar to the
theoretical approach the start bit and stop bit are dropped and
the data is loaded parallelly into the receiver data register. The
microprocessor is more involved in this design than in the
general design. This design is not optimized for low power
Fig.14. RT L Schematic of hamming code decoder
mode or power saving. The testing of the code should be done
using hardware by making use of devices like FPGA. Further,
The following table gives information on cells, nets, I/O there is more involvement of the microprocessor, so there is
ports, LUTs and FFs used in Transmitter and Receiver more load on the microprocessor. This implies that there is a
architecture. Pin details and RTL schematic of the receiver’s need for microprocessors that have higher load handling
datapath and control unit are complicated and thus it’s capabilities or external peripherals that can handle this task.
inclusion in this paper is not desirable, but the details These modifications ensure that the data corruption is less and
regarding the cells, nets, I/O ports, LUTs and FFs are shown that the transmitter side and receiver side can send data and
in TABLE 1. halt the transmission of data if required.
REFERENCES
T ABLE 1. DESIGN UT ILISAT ION INFORMAT ION
[1] M.Poorani and Mrs.R.Kurunjimalar, “Design implementation of UART
and SPI in single FGPA”, Intelligent Systems and Control (ISCO), 2016
Architecture Ce lls Nets I/O LUTs FFs 10th International Conference, 03 November 2016, ISBN: 16429505,
ports DOI: 10.1109/ISCO.2016.7726983.
T ransmitter 16 36 13 0 0 [2] Ritesh Kumar Agrawal and Vivek Ranjan Mishra, “The Design of High
Speed UART ”, Proceedings of 2013 IEEE Conference on Information
Receiver 42 114 37 14 27 and Communication T echnologies, pp. 388–390 (2013).
[3] Nennie Farina Mahat, “Design of a 9-bit UART Module Based on
Verilog HDL”, IEEE-ICSE 2012 Proc., 2012, Kuala Lumpur, Malaysia.
Power consumption is a major factor in designing circuits. [4] Swati Dubey and Amrita Singh, “A Review Paper on Implementation of
Excess power can lead to heating up of devices which is not UART ”, International Journal of Science, Engineering and T echnology
Research (IJSET R) Volume 5, Issue 5, May 2016, ISSN: 2278 – 7798.
desirable. The power consumption and its details are shown in [5] Dr. Garima Bandhawarkar Wakhle, Iti Aggarwal and Shweta Gaba,
figure 15. Here the power consumed by the clock signal and "Synthesis and Implementation of UART using VHDL Codes",
International Symposium on Computer, Consumer and Control, 2012,
IO ports is 0.001W. The static power consumed by the device DOI: 10.1109/IS3C.2012.10
is 1.363W which will lead to the total consumption of 1.364W [6] Naresh Patel, Vatsalkumar Patel, Vikaskumar Patel, "VHDL
Implementation of UART with Status Register ", Internatio nal
of power. The junction temperature is 51.9℃. The power Conference on Communication Systems and Network T echnologies,
supply specification is also shown in figure 15. 2012, DOI: 10.1109/IS3C.2012.10, CSNT 2012
[7] Mohd Yamani Idna Idris, Mashkuri Yaacob, Zaidi Razak, "A ST UDY
OF HARDWARE DESIGN AND OVERHEAD IN BUILT -IN-SELF-
T EST ABLE UART", Winter International Synposium on Information
and Communication T echnologies, 2004, SOICT 2004.
[8] Ruchin, Chandan Mahto, Pawan Whig, "Design & Simulation of
Dynamic UART Using Scan Path T echnique (USPT )", International
Journal of Electrical Electronics & Computer Science Engineering
Special Issue - T eLMISR 2015, ISSN: 2348-2273, IJEECSE 2015.
[9] U. Nanda and S. K. Pattnaik,”rdUniversal Asynchronous Receiver and
T ransmitter (UART),” 2016 3 International Conference on Advanced
Computing and Communication Systems (ICACCS), Coimbatore, 2016,
pp. 1-5. DOI: 10.1109/ICACCS.2016.7586376.
[10] H. Chun-zhi, X. Yin-shuicand W. Lun-yao,” A universal asynchronous
receiver transmitter design,” 2011 International Conference on
Electronics, Communications and Control (ICECC), Ningbo, 2011, pp
691-694. DOI : 10.1109/ICECC.2011.6066542.
[11] Y. Wang and K. Song, “A new approach to realize UART,” Proceedings
of 2011 International Conference on Electronic & Mechanical
Engineering and Information Technology, Harbin, 2011, pp. 2749-2752.
DOI: 10.1109/EMEIT .2011.6023602.
[12] Y. Fang and X. Chen, “Design and simulation ofrd UART Serial
Communication Module based on VHDL,” 2011 3 International
Workshop on Intelligent Systems and Applications, Wuhan, 2011, pp. 1-
4.DOI:10.1109/ISA.2011.5873448.
Fig.15. Power consumption details
Authorized licensed use limited to: Lulea University of Technology. Downloaded on July 17,2020 at 15:57:49 UTC from IEEE Xplore. Restrictions apply.