﻿WEBVTT

NOTE This file was exported by MacCaption version 7.0.13 to comply with the WebVTT specification dated March 27, 2017.

00:00:11.470 --> 00:00:15.766 align:center line:-1 position:50% size:37%
Serial buses are ubiquitous
in today's electronic world.

00:00:15.766 --> 00:00:19.436 align:center line:-1 position:50% size:35%
The one that you may be
most familiar with is USB.

00:00:19.436 --> 00:00:24.900 align:center line:-1 position:50% size:56%
To pass data and control information
from one device or subsystem to another,

00:00:24.900 --> 00:00:30.239 align:center line:-1 position:50% size:49%
signals in the form of digital bits
are transmitted and received serially.

00:00:30.239 --> 00:00:34.409 align:center line:-1 position:50% size:39%
That means one bit at a time,
sequentially.

00:00:34.409 --> 00:00:37.412 align:center line:-1 position:50% size:29%
High-speed systems,
including many PCs,

00:00:37.412 --> 00:00:41.083 align:center line:-1 position:50% size:35%
can transmit and receive
billions of bits per second.

00:00:41.083 --> 00:00:44.336 align:center line:-1 position:50% size:46%
There are many different protocols
which you can think of

00:00:44.336 --> 00:00:46.672 align:center line:-1 position:50% size:29%
as the data structure.

00:00:46.672 --> 00:00:49.800 align:center line:-1 position:50% size:31%
Are bits transmitted
most-significant bit first

00:00:49.800 --> 00:00:52.803 align:center line:-1 position:50% size:36%
or least-significant bit first?

00:00:52.803 --> 00:00:54.596 align:center line:-1 position:50% size:36%
How are the bits grouped?

00:00:54.596 --> 00:00:56.265 align:center line:-1 position:50% size:32%
How are they encoded?

00:00:56.265 --> 00:00:59.768 align:center line:-1 position:50% size:35%
How fast are bits
transmitted and received?

00:00:59.768 --> 00:01:02.521 align:center line:-1 position:50% size:35%
You can think of it as
an agreed-upon language

00:01:02.521 --> 00:01:05.941 align:center line:-1 position:50% size:32%
between two or more
interconnected devices.

00:01:05.941 --> 00:01:07.943 align:center line:-1 position:50% size:41%
If you speak to me in Chinese,

00:01:07.943 --> 00:01:11.029 align:center line:-1 position:50% size:37%
I'm not going to understand
too much beyond "ni hao,"

00:01:11.029 --> 00:01:13.824 align:center line:-1 position:50% size:45%
because I have English receivers.

00:01:13.824 --> 00:01:16.243 align:center line:-1 position:50% size:38%
The most common protocols
that you may encounter

00:01:16.243 --> 00:01:18.495 align:center line:-1 position:50% size:37%
while studying engineering,

00:01:18.495 --> 00:01:21.206 align:center line:-1 position:50% size:53%
especially during your capstone project,

00:01:21.206 --> 00:01:25.502 align:center line:-1 position:50% size:33%
are I²C, which stands for
inter-integrated circuit,

00:01:25.502 --> 00:01:29.548 align:center line:-1 position:50% size:34%
SPI, which stands for
serial peripheral interface

00:01:29.548 --> 00:01:32.092 align:center line:-1 position:50% size:49%
and is sometimes pronounced "spy,"

00:01:32.092 --> 00:01:37.597 align:center line:-1 position:50% size:47%
UART, which stands for universal
asynchronous receiver-transmitter,

00:01:37.597 --> 00:01:41.685 align:center line:-1 position:50% size:36%
and CAN, which stands for
controller area network.

00:01:41.685 --> 00:01:47.733 align:center line:-1 position:50% size:57%
Hi, I'm Johnnie Hancock, Product Manager
for Keysight's InfiniiVision oscilloscopes.

00:01:47.733 --> 00:01:51.862 align:center line:-1 position:50% size:44%
In this lesson, we only have time
to do a brief overview

00:01:51.862 --> 00:01:54.448 align:center line:-1 position:50% size:40%
of just one of these protocols,

00:01:54.448 --> 00:01:59.703 align:center line:-1 position:50% size:50%
but the basic concept of transmitting
and receiving serial data is the same,

00:01:59.703 --> 00:02:02.664 align:center line:-1 position:50% size:46%
regardless of the specific protocol.

00:02:02.664 --> 00:02:06.710 align:center line:-1 position:50% size:41%
We'll be looking at an example
of the CAN bus protocol.

00:02:06.710 --> 00:02:09.421 align:center line:-1 position:50% size:40%
CAN is used in a broad range
of applications,

00:02:09.421 --> 00:02:12.758 align:center line:-1 position:50% size:54%
including control of industrial equipment,

00:02:12.758 --> 00:02:14.676 align:center line:-1 position:50% size:33%
automotive applications,

00:02:14.676 --> 00:02:17.429 align:center line:-1 position:50% size:38%
and robotics, which is where
you may use this bus

00:02:17.429 --> 00:02:19.389 align:center line:-1 position:50% size:37%
while in engineering school.

00:02:19.389 --> 00:02:23.268 align:center line:-1 position:50% size:43%
Let's get started and take a look
at some CAN electrical signals

00:02:23.268 --> 00:02:24.603 align:center line:-1 position:50% size:26%
on an oscilloscope.

00:02:26.063 --> 00:02:27.939 align:center line:-1 position:50% size:34%
This is a CAN bus signal.

00:02:27.939 --> 00:02:31.693 align:center line:-1 position:50% size:46%
It happens to be one of the built-in
education training signals

00:02:31.693 --> 00:02:34.112 align:center line:-1 position:50% size:27%
of this oscilloscope.

00:02:34.112 --> 00:02:36.865 align:center line:-1 position:50% size:45%
The CAN bus is a differential bus,

00:02:36.865 --> 00:02:38.658 align:center line:-1 position:50% size:41%
should use a differential probe.

00:02:38.658 --> 00:02:40.285 align:center line:-1 position:50% size:39%
It's differential because often,

00:02:40.285 --> 00:02:44.373 align:center line:-1 position:50% size:45%
the signals have to be transmitted
over a long distance

00:02:44.373 --> 00:02:48.710 align:center line:-1 position:50% size:34%
and the differential bus is
better for noise immunity.

00:02:48.710 --> 00:02:52.547 align:center line:-1 position:50% size:52%
Let's go ahead and set up the scope
and take a closer look at these signals.

00:02:52.547 --> 00:02:56.927 align:center line:-1 position:50% size:40%
You set the scope up, initially,
just like we've done before.

00:02:56.927 --> 00:02:59.554 align:center line:-1 position:50% size:43%
I'm going to rescale the vertical.

00:03:03.475 --> 00:03:05.769 align:center line:-1 position:50% size:34%
Now, set the trigger level.

00:03:05.769 --> 00:03:08.438 align:center line:-1 position:50% size:53%
Set it about the center of the waveform.

00:03:08.438 --> 00:03:10.565 align:center line:-1 position:50% size:31%
Rescale the horizontal.

00:03:10.565 --> 00:03:17.197 align:center line:-1 position:50% size:42%
The first thing you notice
is that all this digital information

00:03:17.197 --> 00:03:21.284 align:center line:-1 position:50% size:46%
is coming out in bursts or packets.

00:03:21.284 --> 00:03:25.038 align:center line:-1 position:50% size:30%
In CAN vernacular,
they call them frames.

00:03:25.038 --> 00:03:29.459 align:center line:-1 position:50% size:31%
Each of these bursts is
a frame of information,

00:03:29.459 --> 00:03:31.002 align:center line:-1 position:50% size:20%
or a message.

00:03:31.002 --> 00:03:34.381 align:center line:-1 position:50% size:23%
Let's press Stop.

00:03:34.381 --> 00:03:38.427 align:center line:-1 position:50% size:37%
Now, let's take a closer look
at one of these packets

00:03:38.427 --> 00:03:40.345 align:center line:-1 position:50% size:31%
or one of these frames.

00:03:40.345 --> 00:03:46.435 align:center line:-1 position:50% size:32%
This particular CAN bus
is running at 125 Kbps.

00:03:46.435 --> 00:03:48.770 align:center line:-1 position:50% size:49%
Some people call that the baud rate.

00:03:48.770 --> 00:03:53.150 align:center line:-1 position:50% size:55%
The CAN bus itself can run up to 1 Mbps.

00:03:53.150 --> 00:03:57.612 align:center line:-1 position:50% size:36%
I'm going to zoom in on
this particular packet here.

00:03:57.612 --> 00:04:01.950 align:center line:-1 position:50% size:39%
I'm going to set the timebase
or the horizontal

00:04:01.950 --> 00:04:06.872 align:center line:-1 position:50% size:38%
at exactly 16 μs per division.

00:04:06.872 --> 00:04:10.375 align:center line:-1 position:50% size:31%
The reason I set it
at 16 μs per division is,

00:04:10.375 --> 00:04:16.465 align:center line:-1 position:50% size:44%
125 Kbps means each bit is 8 μs.

00:04:16.465 --> 00:04:24.306 align:center line:-1 position:50% size:36%
Now, at 16 μs, I've set it up
for each division to be 2 b,

00:04:24.306 --> 00:04:26.099 align:center line:-1 position:50% size:30%
because what I want
to show you right now

00:04:26.099 --> 00:04:31.062 align:center line:-1 position:50% size:40%
is how many engineers would
decode something like this

00:04:31.062 --> 00:04:32.355 align:center line:-1 position:50% size:23%
many years ago,

00:04:32.355 --> 00:04:36.193 align:center line:-1 position:50% size:42%
before automatic decoding was
available on oscilloscopes.

00:04:36.193 --> 00:04:40.614 align:center line:-1 position:50% size:41%
I call it the brute-force method.

00:04:40.614 --> 00:04:44.201 align:center line:-1 position:50% size:44%
This is the beginning of a packet.

00:04:44.201 --> 00:04:58.423 align:center line:-1 position:50% size:55%
Remember, each division is 2 b,
so we have a 00 00 1 0 1111 01 000 100.

00:04:58.423 --> 00:05:02.719 align:center line:-1 position:50% size:36%
Then, I'd have to slide over
and do the next set of bits

00:05:02.719 --> 00:05:05.222 align:center line:-1 position:50% size:29%
and slide over and do
the next set of bits.

00:05:05.222 --> 00:05:11.728 align:center line:-1 position:50% size:40%
This is a very painful process
to decode this into 1s and 0s.

00:05:11.728 --> 00:05:14.356 align:center line:-1 position:50% size:44%
Let's have the scope do it for us.

00:05:14.356 --> 00:05:16.608 align:center line:-1 position:50% size:39%
I'm going to press Run again.

00:05:16.608 --> 00:05:22.405 align:center line:-1 position:50% size:41%
Let's get one frame on screen.

00:05:22.405 --> 00:05:25.033 align:center line:-1 position:50% size:36%
Some scopes have
a button on the front panel.

00:05:25.033 --> 00:05:26.618 align:center line:-1 position:50% size:23%
It might say Bus.

00:05:26.618 --> 00:05:28.703 align:center line:-1 position:50% size:25%
It might say Serial.

00:05:28.703 --> 00:05:31.498 align:center line:-1 position:50% size:33%
On this one,
it's in the Analyze menu,

00:05:31.498 --> 00:05:34.668 align:center line:-1 position:50% size:27%
so I'll select Analyze,

00:05:34.668 --> 00:05:39.172 align:center line:-1 position:50% size:32%
and then turn on Serial.

00:05:39.172 --> 00:05:45.220 align:center line:-1 position:50% size:50%
Next, I have to select the serial mode
or the serial protocol.

00:05:45.220 --> 00:05:51.560 align:center line:-1 position:50% size:28%
This scope supports
I²C, LIN, SPI, UART,

00:05:51.560 --> 00:05:53.853 align:center line:-1 position:50% size:52%
and the one up here at the top is CAN.

00:05:53.853 --> 00:05:55.647 align:center line:-1 position:50% size:34%
This is a CAN bus signal.

00:05:55.647 --> 00:05:58.650 align:center line:-1 position:50% size:38%
I have to tell the scope
what language we're talking,

00:05:58.650 --> 00:06:00.026 align:center line:-1 position:50% size:21%
which protocol.

00:06:00.026 --> 00:06:02.445 align:center line:-1 position:50% size:28%
This is the CAN bus.

00:06:02.445 --> 00:06:10.537 align:center line:-1 position:50% size:58%
Now you can see, below the signal,
it is automatically decoding this frame here,

00:06:10.537 --> 00:06:15.250 align:center line:-1 position:50% size:46%
or these frames that are occurring
over and over hexadecimally,

00:06:15.250 --> 00:06:18.295 align:center line:-1 position:50% size:44%
but it's jumping all over the place,
and we can't see it.

00:06:18.295 --> 00:06:22.257 align:center line:-1 position:50% size:43%
I could stop it and you could see
the decode there.

00:06:22.257 --> 00:06:26.261 align:center line:-1 position:50% size:40%
Do a single shot,
another frame, another frame.

00:06:26.261 --> 00:06:28.972 align:center line:-1 position:50% size:34%
The problem is, why is it
jumping around like that?

00:06:28.972 --> 00:06:33.101 align:center line:-1 position:50% size:43%
It's because we're not triggering
on anything specific yet.

00:06:33.101 --> 00:06:36.646 align:center line:-1 position:50% size:36%
The scope is still triggering
on its default trigger mode,

00:06:36.646 --> 00:06:39.858 align:center line:-1 position:50% size:42%
which is any edge of the signal.

00:06:39.858 --> 00:06:43.903 align:center line:-1 position:50% size:37%
We can have it trigger on
something specific to CAN.

00:06:43.903 --> 00:06:48.199 align:center line:-1 position:50% size:50%
I'm going to go into the Trigger menu,

00:06:48.199 --> 00:06:50.660 align:center line:-1 position:50% size:27%
select Trigger Type.

00:06:50.660 --> 00:06:54.331 align:center line:-1 position:50% size:35%
You can see it says Edge.

00:06:54.331 --> 00:06:57.542 align:center line:-1 position:50% size:38%
We talked about some
of these other trigger modes

00:06:57.542 --> 00:06:59.544 align:center line:-1 position:50% size:24%
in the last lesson.

00:06:59.544 --> 00:07:01.546 align:center line:-1 position:50% size:30%
Let's go down here
and select the bottom.

00:07:01.546 --> 00:07:04.883 align:center line:-1 position:50% size:26%
It says Serial CAN.

00:07:04.883 --> 00:07:08.928 align:center line:-1 position:50% size:36%
Now, it's locked in on
what's called start of frame

00:07:08.928 --> 00:07:12.849 align:center line:-1 position:50% size:29%
or start of any packet.

00:07:12.849 --> 00:07:17.145 align:center line:-1 position:50% size:40%
There are other specific
conditions you can trigger on.

00:07:17.145 --> 00:07:21.358 align:center line:-1 position:50% size:40%
You'll probably have to do
some homework and studying

00:07:21.358 --> 00:07:25.487 align:center line:-1 position:50% size:44%
to fully understand the CAN bus.

00:07:25.487 --> 00:07:29.866 align:center line:-1 position:50% size:36%
The one I'm going to select
is Data Frame ID.

00:07:29.866 --> 00:07:32.077 align:center line:-1 position:50% size:26%
It's like an address.

00:07:32.077 --> 00:07:38.583 align:center line:-1 position:50% size:38%
Then, I'm going to say trigger
on a specific address,

00:07:38.583 --> 00:07:41.378 align:center line:-1 position:50% size:39%
and right now, it's triggering--

00:07:41.378 --> 00:07:44.923 align:center line:-1 position:50% size:34%
and it's not address,
it's called ID or identifier--

00:07:44.923 --> 00:07:52.305 align:center line:-1 position:50% size:54%
it's triggering on the hex identifier of 000.

00:07:52.305 --> 00:07:55.058 align:center line:-1 position:50% size:35%
The CAN bus,
as well as other protocols,

00:07:55.058 --> 00:07:57.477 align:center line:-1 position:50% size:43%
breaks everything up into fields.

00:07:57.477 --> 00:08:02.691 align:center line:-1 position:50% size:36%
The first field, the first 11 b,
is called the identifier field.

00:08:02.691 --> 00:08:05.276 align:center line:-1 position:50% size:36%
That's where we have 000.

00:08:05.276 --> 00:08:08.988 align:center line:-1 position:50% size:40%
The next field is a status field.

00:08:08.988 --> 00:08:13.952 align:center line:-1 position:50% size:40%
Right now, it tells us DLC = 4.

00:08:13.952 --> 00:08:17.789 align:center line:-1 position:50% size:43%
That's an indicator of how many
data bits are going to follow.

00:08:17.789 --> 00:08:24.295 align:center line:-1 position:50% size:53%
That is the body of this packet or frame,
the data bits.

00:08:24.295 --> 00:08:29.259 align:center line:-1 position:50% size:33%
To give you an idea,
what do these fields do?

00:08:29.259 --> 00:08:31.094 align:center line:-1 position:50% size:31%
The identifier might be,

00:08:31.094 --> 00:08:36.766 align:center line:-1 position:50% size:37%
if you had a robotics project
in your capstone project,

00:08:36.766 --> 00:08:44.274 align:center line:-1 position:50% size:44%
and maybe one particular arm
of your robot or robotics machine

00:08:44.274 --> 00:08:49.404 align:center line:-1 position:50% size:33%
had an ID, might be 000.

00:08:49.404 --> 00:08:52.615 align:center line:-1 position:50% size:29%
The data fields,
these four data bytes,

00:08:52.615 --> 00:08:54.743 align:center line:-1 position:50% size:31%
right now, I press Stop.

00:08:54.743 --> 00:09:00.373 align:center line:-1 position:50% size:31%
It says 35, 4D, 3C, 85.

00:09:00.373 --> 00:09:03.710 align:center line:-1 position:50% size:40%
That's four bytes,
those are hexadecimal codes.

00:09:03.710 --> 00:09:11.718 align:center line:-1 position:50% size:50%
Those four bytes might indicate an X,
or an X, a Y, and a Z position

00:09:11.718 --> 00:09:15.180 align:center line:-1 position:50% size:28%
of your robotics arm.

00:09:15.180 --> 00:09:18.600 align:center line:-1 position:50% size:49%
Let's go ahead and press Run again.

00:09:18.600 --> 00:09:21.311 align:center line:-1 position:50% size:37%
A different ID might position
some other--

00:09:21.311 --> 00:09:23.521 align:center line:-1 position:50% size:38%
I don't know how many arms
your robot has,

00:09:23.521 --> 00:09:27.901 align:center line:-1 position:50% size:49%
but it might do a different positioning
of your robotics arm.

00:09:27.901 --> 00:09:33.448 align:center line:-1 position:50% size:57%
Let's get more of these packets on screen.

00:09:33.448 --> 00:09:35.867 align:center line:-1 position:50% size:44%
As I get more packets on screen,

00:09:35.867 --> 00:09:41.956 align:center line:-1 position:50% size:52%
you can see the decoded field
below each of these packets or frames

00:09:41.956 --> 00:09:45.043 align:center line:-1 position:50% size:34%
got squished,
we can't read it anymore.

00:09:45.043 --> 00:09:47.420 align:center line:-1 position:50% size:53%
There's another method of reading this.

00:09:47.420 --> 00:09:51.716 align:center line:-1 position:50% size:44%
If I go back into the Serial menu,
select Lister,

00:09:51.716 --> 00:09:54.552 align:center line:-1 position:50% size:45%
now we can see a tabular format,

00:09:54.552 --> 00:09:58.515 align:center line:-1 position:50% size:32%
and it shows us what
each of these frames is

00:09:58.515 --> 00:10:00.517 align:center line:-1 position:50% size:29%
on a line in this table.

00:10:00.517 --> 00:10:01.976 align:center line:-1 position:50% size:37%
One thing you might notice.

00:10:01.976 --> 00:10:04.437 align:center line:-1 position:50% size:47%
See this red floating through here?

00:10:04.437 --> 00:10:08.233 align:center line:-1 position:50% size:38%
What's happening is
the scope is detecting errors

00:10:08.233 --> 00:10:10.693 align:center line:-1 position:50% size:29%
on this particular bus.

00:10:10.693 --> 00:10:14.113 align:center line:-1 position:50% size:37%
We could set the scope up
to trigger on specific errors.

00:10:14.113 --> 00:10:16.157 align:center line:-1 position:50% size:48%
We're not going to do that right now.

00:10:16.157 --> 00:10:19.327 align:center line:-1 position:50% size:35%
But we can see,
things aren't working right.

00:10:19.327 --> 00:10:22.497 align:center line:-1 position:50% size:36%
Perhaps your robotics arm
is not positioning

00:10:22.497 --> 00:10:24.958 align:center line:-1 position:50% size:54%
where you think it should be positioning.

00:10:24.958 --> 00:10:26.584 align:center line:-1 position:50% size:35%
What is the cause of that?

00:10:26.584 --> 00:10:28.878 align:center line:-1 position:50% size:50%
Maybe you programmed it incorrectly.

00:10:28.878 --> 00:10:32.549 align:center line:-1 position:50% size:43%
That data field,
maybe that was the wrong data.

00:10:32.549 --> 00:10:35.343 align:center line:-1 position:50% size:34%
You need to go back in
and correct the software.

00:10:35.343 --> 00:10:41.683 align:center line:-1 position:50% size:46%
Or perhaps this error is picking up
a signal integrity problem

00:10:41.683 --> 00:10:43.893 align:center line:-1 position:50% size:43%
with the actual electrical signals.

00:10:43.893 --> 00:10:46.437 align:center line:-1 position:50% size:56%
Maybe there's too much noise on the bus.

00:10:46.437 --> 00:10:49.315 align:center line:-1 position:50% size:29%
We can see that
with the oscilloscope.

00:10:49.315 --> 00:10:53.945 align:center line:-1 position:50% size:34%
Perhaps some of the bits
slid into the next bit field.

00:10:53.945 --> 00:10:56.364 align:center line:-1 position:50% size:42%
The timing of the bits isn't right.

00:10:56.364 --> 00:10:58.074 align:center line:-1 position:50% size:35%
Again, you could see that.

00:10:58.074 --> 00:11:01.703 align:center line:-1 position:50% size:48%
You could also connect up
another channel of the oscilloscope

00:11:01.703 --> 00:11:05.123 align:center line:-1 position:50% size:34%
and maybe probe
the actual analog signals

00:11:05.123 --> 00:11:09.168 align:center line:-1 position:50% size:42%
that are moving the robotic arm
and get a time correlation.

00:11:09.168 --> 00:11:13.464 align:center line:-1 position:50% size:43%
When you send a command out
to reposition a robotic arm,

00:11:13.464 --> 00:11:18.469 align:center line:-1 position:50% size:40%
you can see the analog signal
of the repositioning.

00:11:18.469 --> 00:11:19.721 align:center line:-1 position:50% size:25%
During this lesson,

00:11:19.721 --> 00:11:22.932 align:center line:-1 position:50% size:41%
I tried to give you a rough idea
of what a serial bus is

00:11:22.932 --> 00:11:26.686 align:center line:-1 position:50% size:30%
and how to decode it
using an oscilloscope.

00:11:26.686 --> 00:11:30.815 align:center line:-1 position:50% size:45%
Unfortunately, we didn't have time
to cover this topic in detail.

00:11:30.815 --> 00:11:35.695 align:center line:-1 position:50% size:45%
In our next lesson, we'll be talking
about Lissajous curves.

00:11:35.695 --> 00:11:41.034 align:center line:-1 position:50% size:55%
Remember: You can download additional
technical information about oscilloscopes

00:11:41.034 --> 00:11:44.120 align:center line:-1 position:50% size:44%
at the URL listed on your screen.

00:11:44.120 --> 00:11:46.456 align:center line:-1 position:50% size:32%
Go, Cal Poly Mustangs!

