Hands On Experience With UART, SPI, and I2C Protocol Concepts

Hands On Experience With UART, SPI, and I2C Protocol Concepts

Hi. I’m Travis, and I’m an
engineer on the academic team here at National Instruments. And today I want to show you
a new approach to teaching communication protocols
for digital electronics and mechatronics courses. As you know,
communication protocols are important elements of
mechatronics and overall system design. Understanding the
various protocols and the pros and cons
of each allows engineers to make decisions on which
type of communication protocol goes with which design. And it helps them with building
even larger design systems. While this exchange of
bits and bytes of data is rooted in an understanding
of concepts related to binary, timing, and voltage
levels, the challenge is that students must be
able to choose the best option for their design. This type of decision making
must be based on more than just a theoretical understanding. So let’s go ahead
and get started. So I’m going to show you a lab
where students can learn about three communication protocols. Here I have an LCD
character display that I want to
communicate with, and it’s wired to the UART channel on an
embedded device called myRIO. I can use either
UART, I squared C, or SPI to communicate with
the LCD character display. So I’m going to
first explore UART. So UART uses the
serial protocol, and I have it wired up
here using a power, ground, and a communication line. Now, if I run that VI, you see
that I’m getting updated data from the accelerometer
on board the myRIO, and there’s also a
display for my button. So if I press it, you see that
it’s sending that information to the LCD display. Now let’s go ahead and
take a look at SPI. I’m going to go and open
that up, and close the UART. And what I did in hardware
was I rewired our circuit so that our LCD screen is now
following the SPI protocol using these connectors here. I’m going to go ahead and
run this, and as you can see, we’re getting the same
accelerometer information from the myRIO. If I press the button,
that display updates. Now let’s take a
look at I squared C. We’re going to go
and open this guy up. Close out Spy. And once again, I made some
hardware configuration changes, as you can see here, to get
it ready for I squared C. If I go ahead and
run my VI, you’ll see that once again
I’m getting updates from the accelerometer
on board the myRIO, and I can press the button
here to interact with the LCD screen. So you’re starting to see that
this hands-on setup allows students to quickly interchange
communication protocols, allowing them to investigate
the implications of each type of communication protocol
and gain personal experience with each type. With this approach,
students will not only have a deeper theoretical
understanding of each protocol, but will be able to rely
on personal experience the next time they have to
evaluate which communication type is best for a design. To further explore
this approach, download the free courseware,
The Project Essentials Guide, linked on this page.

8 thoughts to “Hands On Experience With UART, SPI, and I2C Protocol Concepts”

  1. Hlo can you tell me that if a board is dead and want to read using auto isp but the uart bus if off then how to turn it on

  2. "How my Rio Device can talk with UART, SPI, and I2C" Remember in the 00's when video titles accurately summarized content?

  3. This video is the equivalent of taking a cooking class, but instead of actually getting to cook anything they show you a timelapse of wheat growing and then the finished cake.

Leave a Reply

Your email address will not be published. Required fields are marked *