All the images used in my presentation are belonging to their respective owners. I do not own any copyright.
-------------------------------------------------------------------------------------
>> A presentation on Embedded System Interfaces in theoretical aspects.
>> I2C, SPI and UART had been discussed here.
>> Prepared for my M.Tech Seminar for Semester 2 subject named, "High-Speed Digital Design"
>> Guided by Mr Jeyaraj U Kidav, Scientist/Engineer 'D', National Institute of Electronics and Information Technology, Calicut
3. INTRODUCTION
Embedded System :
◦ HARDWARE + SOFTWARE to perform a desired application.
SYSTEM takes INPUT, processes the same, provides
the desired OUTPUT
COMMUNICATION is happening!
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 3
4. - Examples: CAN, I2C, I2S, SPI, Serial, USART,
UART, USB, RS-232, RS-485, Bluetooth,Wi-Fi,
ZigBee, LIN, MQTT, RFID, NFC etc.,
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 4
COMMUNICATION PROTOCOL
- A set of rules and regulations that allow
two electronic devices to connect to exchange
the data with one and another.
- RealWorld Applications:
- Remote Controlled Gadgets
- FileTransfer between PC and Mobile
5. CATEGORIES
In terms of communication:
- Serial Communication
- Parallel Communication
In terms of Peripheral Accessibility:
- Inter System Protocol
Ex: Between a CPU and a Embedded Development board :
USB, UART etc.,
- Intra System Protocol
Ex: Between two devices in a circuit board : SPI, I2C etc.,
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 5
8. Internals of Serial Comm.
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 8
Serial Communication is all about Shift Registers!
Shift registers:
Some D-Flip-Flops serially connected while sharing the same
clock line.
9. How data is sent serially?
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 9
Transmitter: loading data in
parallel to a shift register, and
shifting it out a bit at a time -
Parallel In Serial Out Shift
Register
Receiver: receiving data a single bit at
a time and when all bits are received,
the shift register can be read in
parallel - Serial In Parallel Out Shift
Register
10. SERIAL IO
Serial communication is preferred,
because:
Few number of wires, less space etc.,
Cost effective for long distances
No Crosstalk and Clock Skew effects
SerialTransmission Modes:
Synchronous Data Transfer
Asynchronous DataTransfer
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 10
11. Synchronous Data Transfer
Generates the Data Clock and sends it to the receiver which
works accordingly in a synchronized manner.
Faster and Reliable Mechanism
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 11
12. Asynchronous Data Transfer
Generates the data clock internally and no incoming serial clock
signal.
Proper Communication:TX and RX must be using the same baud
rate - rate at which bits are being sent bps (bits per second).
Uses Start Bit, Stop Bit and Parity Bit for data reliability.
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 12
13. TERMINOLOGIES
MSB/LSB : Sounds familiar, but it’s crucial!
◦ Asynchronous : LSB sent First
◦ Synchronous : MSB sent First
SIMPLEX - HALF DUPLEX - FULL DUPLEX
BAUDRATE - Number of symbols (group of bits)
transceived per second.
-TX and RX should obey same baud rate value!
MASTER/SLAVE Concept: Usually Synchronous.Sometimes, Multi
Master/Slave too!
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 13
14. SPI
Serial Peripheral Interface by Motorola in mid-1980’s
Intra System - Full Duplex, Sync. Serial Communication
Protocol
4 Pins - 4 wire communication protocol
SCK - Serial Clock
MOSI - Master Out, Slave In
MISO - Master In, Slave Out
CS/SS - Chip Select/Slave Select
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 14
15. SPI - Two key terms
CPOL - Clock Polarity
CPHASE - Clock Phase
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 15
16. SPI - Two key terms
CPOL - Clock Polarity
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 16
17. SPI - Two key terms
CPHASE - Clock Phase
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 17
23. Advantages & Disadvantages
Advantages:
◦ High Speed Protocol & Full Duplex
Communication
◦ No complexity - Address of the Slave Device
◦ Best Suited for Single Master Single Slave
Configuration
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 23
24. Advantages & Disadvantages
Disadvantages:
◦ Pin Count is directly proportional to the
Number of Slave Devices
◦ No Acknowledgement!
◦ Slow speed device determining the speed
Example Devices: LM74 and TMP125
Temperature Sensors with SPI Interface
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 24
25. I2C
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 25
Inter Integrated Circuits by Philips in mid-1980’s
Intra System - Half Duplex Sync. Serial Communication
Protocol
2 Pins - 2 wire topology
SCK - Serial Clock
SDA - Serial Data
26. 30 April 2019 09EC6656 | SEMINAR ON INTERFACES 26
I2C
27. I2C - Data Format
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 27
- Register Address + Data
28. I2C - Advanced Logics
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 28
38. USB vs UART vs USART
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 38
39. REFERENCES
“Serial I-O”, Dinesh K. Sharma Electrical Engineering
Department I.I.T. Bombay Mumbai 400 076, (version July 11,
2016)
https://deepbluembedded.com/uart-pic-microcontroller-
tutorial/
https://i2c.info/
https://www.slideshare.net/EmertxeSlides/communication-
protocols-31945098
More References are available in Google andYouTube! Practical
experiments are needed to understand the concepts clearly!
Just search these keywords
30 April 2019 09EC6656 | SEMINAR ON INTERFACES 39