Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MKC-1240]Rework I2C article #1420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
jacobhylen merged 12 commits into main from jacobhylen/updatei2clearn
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
12 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,9 @@ You'll learn what Qwiic is, as well as how to set it up and get started making y

## I2C

We'll go over the conceptual level of how I2C works, if you want to skip ahead you can [click here](#qwiic) to jump directly to the Qwiic section
I2C is the communication protocol that is used in Qwiic, it is a protocol that allows you to connect many peripheral devices to a single controller board, using only two pins.

I2C is a communication protocol that lets you connect multiple I2C compatible devices in a line, using only two pins that are referred to as SCL and SDA.

Each device in the I2C line is functionally independent from the controller, but will respond with information when prompted by the controller.

All devices on the line have an address that is represented by 7 bits. With 7 bits you can create 128 unique combinations, and that means that the theoretical limit of the amount of I2C devices a single line can support is 128.

An I2C message on a lower bit-level looks something like this:

![An I2C Message](./assets/I2C.png)

- The controller sends out instructions through the I2C bus on the data pin (SDA), and the instructions are prefaced with the address, so that only the correct device listens.
- Then there is a bit signifying whether the controller wants to read or write.
- Every message needs to be acknowledged, to combat unexpected results, once the receiver has acknowledged the previous information it lets the controller know, so it can move on to the next set of bits.
- 8 bits of data
- Another acknowledgement bit
- 8 bits of data
- Another acknowledgement bit

But how does the controller and peripherals know where the address, messages, and so on starts and ends? That's what the SCL wire is for. It synchronises the clock of the controller with the devices, ensuring that they all move to the next instruction at the same time.

However, you are nearly never going to *actually* need to consider any of this, in the Arduino ecosystem we have the [Wire library](https://www.arduino.cc/reference/en/language/functions/communication/wire/) that handles everything for you.

But what does all of this have to do with Qwiic?
To learn more about I2C and how it functions, check out our [I2C guide](/learn/communication/wire#tutorials).

## Qwiic
Qwiic is an ecosystem of breakout-modules and development boards with a so called Qwiic connector. The Arduino UNO R4 WiFi has one, for example. The Qwiic ecosystem combines the flexibility of I2C with the ease of use of pre-bundled cables making it incredibly easy to create lines of I2C devices, by collecting all the pins to get up and running with a large network of I2C devices in a single cable.
Expand Down
View file Open in desktop
Binary file not shown.
View file Open in desktop
Binary file not shown.
View file Open in desktop
Binary file not shown.
View file Open in desktop
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[フレーム]
View file Open in desktop
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[フレーム]
View file Open in desktop
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[フレーム]
View file Open in desktop
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[フレーム]
View file Open in desktop
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[フレーム]
View file Open in desktop
Binary file not shown.
View file Open in desktop
Binary file not shown.
View file Open in desktop
Binary file not shown.
View file Open in desktop
Binary file not shown.
View file Open in desktop
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[フレーム]
480 changes: 267 additions & 213 deletions content/learn/05.communication/01.wire/wire.md
View file Open in desktop

Large diffs are not rendered by default.

AltStyle によって変換されたページ (->オリジナル) /