How SPI & I2C Work - Communication Protocols | Embedded Systems Explained

  Рет қаралды 19,292

TheFabytm

TheFabytm

Күн бұрын

In part of my Embedded Systems Explained series I'll be explaining the fundamentals of SPI & I2C and telling you how to experiment with them at home.
Texas Instruments MSP430 LaunchPad (US): amzn.to/3KzlePN
Texas Instruments MSP430 LaunchPad (UK): amzn.to/2UipjAq
MSP430 Microcontroller Basics - Book (US): amzn.to/2OY8tDT
MSP430 Microcontroller Basics - Book (UK): amzn.to/2P1QoVf
Last video: • How To Learn Embedded ...
Follow me on Instagram : / thefabytm
Like me on Facebook : / thefabytm
Secondary Channel : / morethefabytm
Follow me on Twitter : / thefabytm
Register to get $5 coupon on PCB order: www.nextpcb.com/register?code...
Try Amazon Prime with a free 30 day trial: amzn.to/2MG3A0T
Sign up for Airalo (international eSIM plans): www.airalo.com/?rfsn=4268870....
0:00 Introduction
0:17 Why do we need SPI & I2C?
1:37 SPI
5:09 I2C
8:41 How to experiment?
9:30 Outro
My name is Fabi and I am an Engineer and Tech Enthusiast from Romania. On my KZbin channel I do thorough reviews of gadgets, showcase my programming projects and show you which cars I am driving.
This is part 2 of my Embedded Systems Explained series!
Why do we need SPI and I2C though when we already have UART? Well, there's 2 main drawbacks to this serial communication. First of all, it's asynchronous, secondly, UART is meant for only two devices, whereas many times, multiple devices need to be connected to a system through the same communication protocol.
SPI or Serial Peripheral Interface is a communication protocol which allows for data transfer between multiple systems. The SPI protocol allows for only one controller (or main device) on the SPI bus.
I2C or Inter-Integrated Circuit allows for communication between multiple systems, with the difference being that the I2C protocol also allows for more than one controller on the I2C bus.

Пікірлер: 67
@TheFabytm
@TheFabytm 4 жыл бұрын
What subject in the field of Embedded Systems are you interested in learning about next? :) How To Learn Embedded Systems Playlist: kzbin.info/aero/PLeAb9_hv082weQ10WcvFfLBlNcCYXlQ4q
@grigorutabogdan7530
@grigorutabogdan7530 4 жыл бұрын
JTAG
@karthikrangaraj7944
@karthikrangaraj7944 4 жыл бұрын
Device driver
@TheFabytm
@TheFabytm 4 жыл бұрын
Thanks, I've written it down! :)
@h_beserra
@h_beserra 4 жыл бұрын
How start with embedded linux
@TheFabytm
@TheFabytm 4 жыл бұрын
Interesting one! Stay tuned!
@johnbabrick
@johnbabrick Жыл бұрын
Very very helpful as I cram for a job interview to remind me of stuff I haven't used in many years. Very much appreciated.
@TheFabytm
@TheFabytm Жыл бұрын
Awesome, I’m glad you found it useful! Hope you did good on the interview!
@i-chunhuang8413
@i-chunhuang8413 3 ай бұрын
Very clear and informative. Thanks so much for this video!
@ultimateaquatics9114
@ultimateaquatics9114 2 жыл бұрын
Great job dude. Best series for embedded systems beginners. Keep up the good work 👏
@TheFabytm
@TheFabytm 2 жыл бұрын
Thanks ! I’m really glad you enjoyed it! 😁
@rostkgb
@rostkgb 2 жыл бұрын
Good video. However, I am still sticking to master-slave notations
@TheFabytm
@TheFabytm 2 жыл бұрын
Thank you!
@MrBumbottum
@MrBumbottum 4 жыл бұрын
Thanks for the video! Really good overview of the two protocols.
@TheFabytm
@TheFabytm 4 жыл бұрын
I’m glad you found this informative! Stay tuned for more!
@grantscott1686
@grantscott1686 3 жыл бұрын
Great video! Been struggling to understand these two interface types and I think this helped a lot
@TheFabytm
@TheFabytm 3 жыл бұрын
Thanks! I’m glad this helped you!
@kevin2706
@kevin2706 3 жыл бұрын
this channel is gold
@TheFabytm
@TheFabytm 3 жыл бұрын
Thanks a lot!😍
@deniselectron9424
@deniselectron9424 4 жыл бұрын
great video, I'm following this serie. Good job
@TheFabytm
@TheFabytm 4 жыл бұрын
Thank you, I’ll keep the videos coming!
@emmanuelnoguez8212
@emmanuelnoguez8212 4 жыл бұрын
Excellent video! and simply explained
@TheFabytm
@TheFabytm 4 жыл бұрын
Thank you! More videos are on the way!
@sreramvempati8881
@sreramvempati8881 4 жыл бұрын
Bro explanation superb but we want practical approach please make a video how spi , i2c, Uart works with different types of devices using hardware that will be really helpful
@TheFabytm
@TheFabytm 4 жыл бұрын
The current plan is to first explain the theory behind the most important peripherals and then to create a project-course where everyone can follow and upload their progress!
@AlexRyan
@AlexRyan 4 жыл бұрын
These are very high quality and high value velocity videos and I very much appreciate the value offering. One suggestion to make them even better would be to start with a real world concrete example of how the technology being discussed is actually used. e.g. Where is SPI used? Why does it solve this problem better than other alternatives? Where is I2C used? Why does it solve this problem better than other alternatives? Going from the concrete to the abstract is very helpful for orienting a discussion. Even more helpful would be telling the story of why the technology was actually invented. i.e. What problem was the inventor trying to solve? Why were the other tools available at the time inadequate? How did this technology meet the need better than the alternatives? This information can be helpful not only in orienting for understanding, but also for motivating the student because it will be easier to imagine situations in which having this skill would be useful. This, in turn, would make it easier to choose a project to explore the development of the skill.
@TheFabytm
@TheFabytm 4 жыл бұрын
Thank you so much for the advice, it’s great to hear from viewers what can be improved! I didn’t think of this idea but as you said, it goes really well with the current format, so going forward, I’ll include this information before going into the specifics of the topic I am talking about.
@MeghanaRPrakash
@MeghanaRPrakash 7 ай бұрын
Great explanation!!! When are you uploading videos of practical working of these?
@sebastianospina4599
@sebastianospina4599 3 жыл бұрын
Awesome video!! Thank you very much for doing this! BTW, I would like to propose the Knight/Padawan nomenclature
@TheFabytm
@TheFabytm 3 жыл бұрын
Thanks!😁 that sounds like a good replacement for the current nomenclature:))
@jh-lp7cg
@jh-lp7cg 2 жыл бұрын
Wait, they changed names why? Not sure what politics has to do with SPI and I2C?
@DAAI741
@DAAI741 Жыл бұрын
what's political about it
@vishnukumartr4356
@vishnukumartr4356 3 жыл бұрын
Simply Explained🤩❤🥳
@TheFabytm
@TheFabytm 3 жыл бұрын
Thank you! Check out the other videos in the series too, you might find them useful!
@vishnukumartr4356
@vishnukumartr4356 3 жыл бұрын
@@TheFabytm Definitely Brother.
@vanessaingrid7582
@vanessaingrid7582 2 жыл бұрын
@TheFabytm. Thanks for the detailed explanation. Please could you make a video on AXI interface?
@TheFabytm
@TheFabytm 2 жыл бұрын
Unfortunately I’m not familiar with that Interface as I never used it.
@Monotoba
@Monotoba Жыл бұрын
It would have been nice if you had also covered device addressing for each bus type, otherwise you did a great job!
@specialrelativity8222
@specialrelativity8222 9 ай бұрын
my two devices are not working simultaneously with spi. when i connect miso to both devices it doesn't work. any help??
@TheFabytm
@TheFabytm 9 ай бұрын
Do you have separate chip select lines? If you do, are you activating them properly?
@nirupamajana6343
@nirupamajana6343 4 жыл бұрын
Do you know to use code composer studio? Please show a demo on Adc using graphs in code composer studio. If possible please show a demo on Fft of a signal in code composer atudio
@TheFabytm
@TheFabytm 4 жыл бұрын
I’ve use CCS but not the features you mentioned. Is there any way I could help you directly? I still have a bunch of topics lined up and this is a bit too specific for a video (perhaps a full CCS guide but that is still a long way out).
@ViratKohli18_Lovers
@ViratKohli18_Lovers 4 жыл бұрын
Please explain CAN, LIN, and flexray protocol
@TheFabytm
@TheFabytm 4 жыл бұрын
CAN is coming up this Sunday, possibly also LIN!
@vasanth0x55tube
@vasanth0x55tube 4 жыл бұрын
I3C is coming to replace both.
@DJPhilTBCollins
@DJPhilTBCollins 4 жыл бұрын
Whoa, had no idea this was a thing. Thank you.
@TheFabytm
@TheFabytm 4 жыл бұрын
You’re right, though it will take a bit until that point.
@bhanusashankreddy5013
@bhanusashankreddy5013 3 жыл бұрын
Can u clearly explain why uart cant achieve speed as much as i2c why?
@TheFabytm
@TheFabytm 3 жыл бұрын
Having no clock line means that there has to be a very accurate oscillator on both sides (otherwise, the receiver wouldn’t know when one bit ends and the next one starts). This limits the communication frequency, compared to I2C, which uses a dedicated clock line between the 2 partners communicating.
@Jonas_Meyer
@Jonas_Meyer 4 жыл бұрын
Didn't know about the name changes of I2C/SPI. I will try remember them the next time im using spi or i2c. Btw great series hope you continoue with it.
@TheFabytm
@TheFabytm 4 жыл бұрын
Yes, it happened recently! Stay tuned, there will be more videos on this series for sure!
@ulfrinn8783
@ulfrinn8783 3 жыл бұрын
Nothing wrong with the old names, so don't worry about it too much.
@4144758
@4144758 3 жыл бұрын
Use the old names in an interview or always lol. Engineers aren't woke
@DAAI741
@DAAI741 Жыл бұрын
@@4144758 nothing woke about using a better name
@4144758
@4144758 Жыл бұрын
@@DAAI741 master slave is clear and definite and causes none confusion
@Username-yv9pc
@Username-yv9pc 3 жыл бұрын
Just name it master/slave, no need to call it differently when everyone uses master/slave. It makes it confusing. But good video btw
@DAAI741
@DAAI741 Жыл бұрын
controller/peripheral is pretty unambiguous. As that's language that has been used in various network topologies for a long time.
@4144758
@4144758 Жыл бұрын
@@DAAI741 peripheral is not as clear as slave in denoting the subservient relationship. Peripherals are also a class of input output devices to any computer hence confusion. A mouse is a peripheral but certainly not a slave to the computer
@DAAI741
@DAAI741 Жыл бұрын
@@4144758 Computer peripherals are called so because they serve the same role in the network as any other peripheral. We don't call them slave devices not because they're technically not, but because it's just weird to use slavery as your analogy for nodes on a network. All it's meant to describe is hierarchy. Parent/child, Leader/follower, hell, even Boss/laborer provide perfectly adequate metaphors that don't call back to violent subjugation of people. But why use a metaphor at all? Just call it as it is: a controller, and a peripheral
@4144758
@4144758 Жыл бұрын
@@DAAI741 no reason to muddy language just to fit your political agenda imo. Slavery around the world is usually total control and subjugation. Much unlike laborer, employee, child, or peripheral. Do what you want. I'm libertarian I don't care. This don't matter but the meddling in our schools etc does. It will unfortunately come to a head soon though and explode. Peaceful divorce God willing.
@DAAI741
@DAAI741 Жыл бұрын
@@4144758 How is a mouse not a slave to a computer? The computer, as the host, controls and mediates the communication. The data obtained by the mouse is processed by, and only useful to the computer.
@KevinJohnMulligan
@KevinJohnMulligan 3 жыл бұрын
Major name changes that he mentioned Old name | New name ================== Master | Controller Slave | Peripheral SPI only ================== Slave select | Chip select
@lowrezable
@lowrezable Ай бұрын
Peace bro ! Thank you so much !
Understanding SPI
11:50
Rohde Schwarz
Рет қаралды 77 М.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 101 МЛН
CHOCKY MILK.. 🤣 #shorts
00:20
Savage Vlogs
Рет қаралды 13 МЛН
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 109 МЛН
How To Learn Embedded Systems At Home | 5 Concepts Explained
10:34
PROTOCOLS: UART - I2C - SPI - Serial communications #001
11:58
Electronoobs
Рет қаралды 1,4 МЛН
Why Embedded Systems is a great career choice (and the reason why I choose it)
6:58
Prof. Dr. Florian Leitner-Fischer
Рет қаралды 34 М.
I2C and SPI on a PCB Explained!
15:34
Altium Academy
Рет қаралды 143 М.
I2C vs SPI - Which one to select for your design
6:05
Bina Bhatt
Рет қаралды 9 М.
What is a Protocol? (Deepdive)
18:14
LiveOverflow
Рет қаралды 163 М.
Extracting Firmware from Embedded Devices (SPI NOR Flash) ⚡
18:41
Flashback Team
Рет қаралды 562 М.
Are you competing for excitement or excitement and humor? Shoot as you please. Don't follow the
0:56
я,когда приехала к бабушке #shorts
0:12
Kamilla Family
Рет қаралды 1,7 МЛН
¡Ñom Ñom! ¡Es la Hora de Comer! #pinkfongespañol
0:16
Pinkfong en español - Canciones Infantiles
Рет қаралды 20 МЛН
А вы бы как с ним поступили?
0:22
Почему?
Рет қаралды 2,4 МЛН
Hardest Basketball Shots Ever 😳
0:35
Red Bull
Рет қаралды 24 МЛН