Sei sulla pagina 1di 4

http://www.circuitbasics.

com/basics-uart-communication/
UART stands for Universal Asynchronous Receiver/Transmitter. It’s not a communication
protocol like SPI and I2C, but a physical circuit in a microcontroller, or a stand-alone IC.
A UART’s main purpose is to transmit and receive serial data.
One of the best things about UART is that it only uses two wires to transmit data between
devices.
Introduction to UART Communication
In UART communication, two UARTs communicate directly with each other. Only two
wires are needed to transmit data between two UARTs. Data flows from the Tx pin of the
transmitting UART to the Rx pin of the receiving UART:

UARTs transmit data asynchronously, which means there is no clock signal to


synchronize the output of bits from the transmitting UART to the sampling of bits by the
receiving UART. Instead of a clock signal, the transmitting UART adds start and stop bits
to the data packet being transferred. These bits define the beginning and end of the data
packet so the receiving UART knows when to start reading the bits.

ADC

An analog to digital converter (ADC) is an electronic device which converts varying


analog signals into digital signals so that they can easily be read by the digital devices. it
have many applications in electronics projects. ADC converts the quantities of real world
phenomenon in to digital language which is used in control systems, data computing,
data transmission and information processing.
10-bit ADC meaning it has the ability to detect 1,024 (2^10) discrete analog levels. Some
microcontrollers have 8-bit ADCs (2^8 = 256 discrete levels) and some have 16-bit ADCs (2^16
= 65,536 discrete levels).

What is I2C?

I2C is a serial communication protocol. It provides the good support to the slow devices,
for example, EEPROM, ADC, and RTC etc.
I2c is not only used with the single board but also used with the other external components
which have connected with boards through the cables.
I2C is basically two-wire communication protocol.It uses only two wire for the
communication. In which one wire is used for the data (SDA) and other wire is used for
the clock (SCL).
In I2C, both buses are bidirectional, which means master able to send and receive the
data from the slave.

Feature of I2C Bus

● In I2C only two buses are required for the communication, the serial data bus (SDA) and
serial clock bus (SCL).
● Each component in I2C bus is software addressable by a unique address, this unique
address is used by the master to communicate with a particular slave.
● Always a master and slave relationships exist at all times in I2C.
● In I2C, Alway’s communication is started by the master.
● The I2C bus provides the ability of the arbitration and collision detection.
● I2C is the 8-bit oriented serial bidirectional communication, there are following speed
mode in I2C

In I2C only two wire are used for communication, one is data bus (SDA) and the second one is
the clock bus (CLK).

What does Pulse Width Modulation (PWM) mean?


Pulse-width modulation (PWM) is a modulation process or technique used in most
communication systems for encoding the amplitude of a signal right into a pulse width or
duration of another signal, usually a carrier signal, for transmission. Although PWM is
also used in communications, its main purpose is actually to control the power that is
supplied to various types of electrical devices, most especially to inertial loads such as
AC/DC motors.
Duty cycle = TON/(TON+TOFF)
WatchDog Timer

A watchdog timer (WDT) is a hardware timer that automatically generates a system reset if
the main program neglects to periodically service it. It is often used to automatically reset an
embedded device that hangs because of a software or hardware fault.

Embedded Systems - Timer/Counter


A timer is a specialized type of clock which is used to measure time intervals. A timer that
counts from zero upwards for measuring time elapsed is often called a stopwatch. It is a device
that counts down from a specified time interval and used to generate a time delay, for example,
an hourglass is a timer.
A counter is a device that stores (and sometimes displays) the number of times a particular
event or process occurred, with respect to a clock signal. It is used to count the events
happening outside the microcontroller. In electronics, counters can be implemented quite easily
using register-type circuits such as a flip-flop.

SPI Communication Protocol


Serial Peripheral Interface (SPI) is an interface bus commonly used to send data between
microcontrollers and small peripherals such as shift registers, sensors, and SD cards. It uses
separate clock and data lines, along with a select line to choose the device you wish to talk to.
In SPI, only one side generates the clock signal (usually called CLK or SCK for Serial ClocK).
The side that generates the clock is called the "master", and the other side is called the "slave".
There is always only one master (which is almost always your microcontroller), but there can be
multiple slaves (more on this in a bit).
When data is sent from the master to a slave, it's sent on a data line called MOSI, for "Master
Out / Slave In". If the slave needs to send a response back to the master, the master will
continue to generate a prearranged number of clock cycles, and the slave will put the data onto
a third data line called MISO, for "Master In / Slave Out".

Potrebbero piacerti anche