Friday, 8 September 2017

UART Between Microcontrollers Using Proteus

UART Communication Between Microcontrollers Using Proteus UART stands for Universal Asynchronous Reception and Transmission of data serially between two terminals. This mode of communication has the advantage of data transmission using lesser number of I/O Pins. For longer transmission distances this is essential as it involves less number of transmission wires. In this article, we shall see how two microcontrollers communicate with each other using their UART peripheral. UART Bridge Between Two Microcontrollers We shall discuss this through a simulation project involving switches and LED’s. This example project updates the status of switches connected to the microcontroller to the opposite microcontroller through the UART Communication. The logic is developed such that, whenever there is a change in the state of the switches, the present state of the switches is sent to the opposite controller. Thus, the present state of switches connected to ‘UART1’ is shown by the ‘UART2’ and vice versa. The input ports of the microcontroller are internally pulled-up. So, the ON State of the switch indicates Low input and OFF State of the switch indicates High input to the microcontroller.   RS-232 Standard for Serial Transmission The circuit discussed in the UART Bridge example is suitable for the On-Board microcontrollers i.e., when the two microcontrollers are on the same board or nearer to each other, generally up to 6-Inches apart with a good PCB layout. In case if the microcontroller is at remote location, then the signal has to be strengthened and transmitted. For this purpose, the voltage level of the signal is increased.   In addition to the RX and TX pins along with the Ground/Common terminal, the RS-232 Protocol contains some other signals for establishing communication. These pins are used for data flow control. These pins are individually controlled by the microcontroller for proper and valid communication and to avoid loss of data. These pins are, CTS – Clear To Send RTS – Request To Send DCD – Data Carrier Detect DTR – Data Terminal Ready RI – Ring Indicator DSR – Data Set Ready It is not mandatory to use the flow control pins. These pins do not have direct control over the UART registers. These pins are read or written by microcontroller as I/O pins. Real-Time Application Idea for RS-232  Suppose there is an auditorium with limited occupancy and there are two counters to issue the tickets. These counters are considerably far away such that topics like the number of tickets left cannot be communicated easily and usage of preprinted tickets is not possible. In such cases, the following circuit can be used. It is just an example to demonstrate the concept. The program flow is in such a way that, each time when a ticket is issued at one counter the remaining tickets are updated at both the counters so that, the issuing person has the knowledge of how many tickets can be issued further. As the counters are remotely located, the RS-232 mode is used to connect these two counters. The flow chart for the above example is shown at the end of the article. In order to execute the flow chart, we need to know how to use the UART Peripheral of a microcontroller. Let’s discuss how the UART Mode of a microcontroller is used, by discussing various parameters of the communication protocol. Voltage Level UART Protocol is one of the Serial data transmission modes. The voltage level of UART is either 5V-TTL or 3.3V. This voltage level is suitable for On-Board data processing between two terminals on a single PCB or with in a small control panel. But, for long...
read more

The post UART Between Microcontrollers Using Proteus appeared first on Electronic Circuits and Diagram-Electronics Projects and Design.

No comments:

Post a Comment

Unveil the secret of stretchable technology through color

A research team accelerates stretchable technology commercialization with world's first visualization of serpentine structures.